View | Details | Raw Unified | Return to bug 223589
Collapse All | Expand All

(-)files/patch-hotspot-src-os-bsd-vm-os_bsd.cpp (-5 / +19 lines)
Lines 1-6 Link Here
1
--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig	2017-09-06 22:12:44 UTC
1
--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig	2017-11-09 17:12:20.433597000 +0100
2
+++ hotspot/src/os/bsd/vm/os_bsd.cpp
2
+++ hotspot/src/os/bsd/vm/os_bsd.cpp	2017-11-09 17:15:24.165281000 +0100
3
@@ -189,7 +189,9 @@ julong os::Bsd::available_memory() {
3
@@ -189,7 +189,9 @@
4
 #ifdef __FreeBSD__
4
 #ifdef __FreeBSD__
5
   static const char *vm_stats[] = {
5
   static const char *vm_stats[] = {
6
     "vm.stats.vm.v_free_count",
6
     "vm.stats.vm.v_free_count",
Lines 10-16 Link Here
10
     "vm.stats.vm.v_inactive_count"
10
     "vm.stats.vm.v_inactive_count"
11
   };
11
   };
12
   size_t size;
12
   size_t size;
13
@@ -775,6 +777,11 @@ static void *java_start(Thread *thread)
13
@@ -775,6 +777,11 @@
14
   guarantee(unique_thread_id != 0, "unique thread id was not found");
14
   guarantee(unique_thread_id != 0, "unique thread id was not found");
15
   osthread->set_unique_thread_id(unique_thread_id);
15
   osthread->set_unique_thread_id(unique_thread_id);
16
 #endif
16
 #endif
Lines 22-28 Link Here
22
   // initialize signal mask for this thread
22
   // initialize signal mask for this thread
23
   os::Bsd::hotspot_sigmask(thread);
23
   os::Bsd::hotspot_sigmask(thread);
24
 
24
 
25
@@ -938,6 +945,11 @@ bool os::create_attached_thread(JavaThre
25
@@ -938,6 +945,11 @@
26
   guarantee(unique_thread_id != 0, "just checking");
26
   guarantee(unique_thread_id != 0, "just checking");
27
   osthread->set_unique_thread_id(unique_thread_id);
27
   osthread->set_unique_thread_id(unique_thread_id);
28
 #endif
28
 #endif
Lines 34-36 Link Here
34
   osthread->set_pthread_id(::pthread_self());
34
   osthread->set_pthread_id(::pthread_self());
35
 
35
 
36
   // initialize floating point control register
36
   // initialize floating point control register
37
@@ -3910,6 +3922,13 @@
38
     pthread_setname_np(buf);
39
   }
40
 #endif
41
+#ifdef __FreeBSD__
42
+  if (name != NULL) {
43
+    char buf[MAXCOMLEN+1];
44
+    snprintf(buf, sizeof(buf), "%s", name);
45
+    pthread_set_name_np(pthread_self(), buf);
46
+  }
47
+#endif
48
 }
49
 
50
 bool os::distribute_processes(uint length, uint* distribution) {

Return to bug 223589