8147884: Names of GC threads should be set before the threads start
authorasmotrak
Wed, 03 Feb 2016 09:31:22 -0800
changeset 35916 23189249c2c1
parent 35915 5808cd93abfc
child 35919 35abf02053d9
8147884: Names of GC threads should be set before the threads start Reviewed-by: mgerdin, david
hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp
hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.cpp
--- a/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Wed Feb 03 14:15:57 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/concurrentG1RefineThread.cpp	Wed Feb 03 09:31:22 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,10 +59,10 @@
     _monitor = DirtyCardQ_CBL_mon;
   }
   initialize();
-  create_and_start();
 
   // set name
   set_name("G1 Refine#%d", worker_id);
+  create_and_start();
 }
 
 void ConcurrentG1RefineThread::initialize() {
--- a/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.cpp	Wed Feb 03 14:15:57 2016 +0100
+++ b/hotspot/src/share/vm/gc/g1/g1YoungRemSetSamplingThread.cpp	Wed Feb 03 09:31:22 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,9 +61,8 @@
                          true,
                          Monitor::_safepoint_check_never);
 
+  set_name("G1 Young RemSet Sampling");
   create_and_start();
-
-  set_name("G1 Young RemSet Sampling");
 }
 
 void G1YoungRemSetSamplingThread::sleep_before_next_cycle() {