8147442: Event-based tracing to allow for tracing Klass creation
authormgronlun
Tue, 01 Mar 2016 23:48:46 +0100
changeset 36386 d7f5e6df26df
parent 36385 09b091ad5de2
child 36387 1c1c1c1aa3ad
8147442: Event-based tracing to allow for tracing Klass creation Reviewed-by: jbachorik, egahlin
hotspot/src/share/vm/classfile/klassFactory.cpp
hotspot/src/share/vm/trace/traceMacros.hpp
--- a/hotspot/src/share/vm/classfile/klassFactory.cpp	Tue Mar 01 23:47:30 2016 +0100
+++ b/hotspot/src/share/vm/classfile/klassFactory.cpp	Tue Mar 01 23:48:46 2016 +0100
@@ -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
@@ -29,6 +29,7 @@
 #include "classfile/klassFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "prims/jvmtiEnvBase.hpp"
+#include "trace/traceMacros.hpp"
 
 static ClassFileStream* prologue(ClassFileStream* stream,
                                  Symbol* name,
@@ -136,5 +137,7 @@
     result->set_cached_class_file(cached_class_file);
   }
 
+  TRACE_KLASS_CREATION(result, parser, THREAD);
+
   return result;
 }
--- a/hotspot/src/share/vm/trace/traceMacros.hpp	Tue Mar 01 23:47:30 2016 +0100
+++ b/hotspot/src/share/vm/trace/traceMacros.hpp	Tue Mar 01 23:48:46 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -29,6 +29,7 @@
 
 #define EVENT_THREAD_EXIT(thread)
 #define EVENT_THREAD_DESTRUCT(thread)
+#define TRACE_KLASS_CREATION(k, p, t)
 
 #define TRACE_INIT_KLASS_ID(k)
 #define TRACE_INIT_THREAD_ID(td)