equal
deleted
inserted
replaced
42 void LogDecorations::initialize(jlong vm_start_time) { |
42 void LogDecorations::initialize(jlong vm_start_time) { |
43 _vm_start_time_millis = vm_start_time; |
43 _vm_start_time_millis = vm_start_time; |
44 } |
44 } |
45 |
45 |
46 const char* LogDecorations::host_name() { |
46 const char* LogDecorations::host_name() { |
47 const char* host_name = OrderAccess::load_acquire(&_host_name); |
47 const char* host_name = Atomic::load_acquire(&_host_name); |
48 if (host_name == NULL) { |
48 if (host_name == NULL) { |
49 char buffer[1024]; |
49 char buffer[1024]; |
50 if (os::get_host_name(buffer, sizeof(buffer))) { |
50 if (os::get_host_name(buffer, sizeof(buffer))) { |
51 host_name = os::strdup_check_oom(buffer); |
51 host_name = os::strdup_check_oom(buffer); |
52 const char* old_value = Atomic::cmpxchg(host_name, &_host_name, (const char*)NULL); |
52 const char* old_value = Atomic::cmpxchg(host_name, &_host_name, (const char*)NULL); |