changeset 4466:12494ffb721b

8013117: Thread-local trace_buffer has wrong type and name Reviewed-by: dholmes, sla
author rbackman
date Wed, 17 Apr 2013 11:29:20 +0200
parents 2a0c45364baa
children 2efcfec8a6dc c8ebb78f7fce
files src/share/vm/runtime/thread.cpp src/share/vm/runtime/thread.hpp src/share/vm/trace/noTraceBackend.hpp src/share/vm/trace/traceBackend.hpp src/share/vm/trace/traceMacros.hpp
diffstat 5 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp	Fri Apr 26 17:13:16 2013 -0700
+++ b/src/share/vm/runtime/thread.cpp	Wed Apr 17 11:29:20 2013 +0200
@@ -238,7 +238,6 @@
   CHECK_UNHANDLED_OOPS_ONLY(_gc_locked_out_count = 0;)
   _jvmti_env_iteration_count = 0;
   set_allocated_bytes(0);
-  set_trace_buffer(NULL);
   _vm_operation_started_count = 0;
   _vm_operation_completed_count = 0;
   _current_pending_monitor = NULL;
--- a/src/share/vm/runtime/thread.hpp	Fri Apr 26 17:13:16 2013 -0700
+++ b/src/share/vm/runtime/thread.hpp	Wed Apr 17 11:29:20 2013 +0200
@@ -254,7 +254,7 @@
   jlong _allocated_bytes;                       // Cumulative number of bytes allocated on
                                                 // the Java heap
 
-  TRACE_BUFFER _trace_buffer;                   // Thread-local buffer for tracing
+  TRACE_DATA _trace_data;                       // Thread-local data for tracing
 
   int   _vm_operation_started_count;            // VM_Operation support
   int   _vm_operation_completed_count;          // VM_Operation support
@@ -442,8 +442,7 @@
     return allocated_bytes;
   }
 
-  TRACE_BUFFER trace_buffer()              { return _trace_buffer; }
-  void set_trace_buffer(TRACE_BUFFER buf)  { _trace_buffer = buf; }
+  TRACE_DATA* trace_data()              { return &_trace_data; }
 
   // VM operation support
   int vm_operation_ticket()                      { return ++_vm_operation_started_count; }
--- a/src/share/vm/trace/noTraceBackend.hpp	Fri Apr 26 17:13:16 2013 -0700
+++ b/src/share/vm/trace/noTraceBackend.hpp	Wed Apr 17 11:29:20 2013 +0200
@@ -36,6 +36,11 @@
   }
 };
 
+class TraceThreadData {
+public:
+    TraceThreadData() {}
+};
+
 typedef NoTraceBackend Tracing;
 
 #endif
--- a/src/share/vm/trace/traceBackend.hpp	Fri Apr 26 17:13:16 2013 -0700
+++ b/src/share/vm/trace/traceBackend.hpp	Wed Apr 17 11:29:20 2013 +0200
@@ -52,6 +52,11 @@
   }
 };
 
+class TraceThreadData {
+public:
+    TraceThreadData() {}
+};
+
 typedef TraceBackend Tracing;
 
 #else /* INCLUDE_TRACE */
--- a/src/share/vm/trace/traceMacros.hpp	Fri Apr 26 17:13:16 2013 -0700
+++ b/src/share/vm/trace/traceMacros.hpp	Wed Apr 17 11:29:20 2013 +0200
@@ -28,7 +28,7 @@
 #define EVENT_THREAD_EXIT(thread)
 
 #define TRACE_INIT_ID(k)
-#define TRACE_BUFFER void*
+#define TRACE_DATA TraceThreadData
 
 #define TRACE_START() JNI_OK
 #define TRACE_INITIALIZE() JNI_OK