changeset 10398:a6ff1064c4d7

8147442: Event-based tracing to allow for tracing Klass creation Reviewed-by: jbachorik, egahlin
author mgronlun
date Tue, 01 Mar 2016 23:48:46 +0100
parents 56fbd5c60c96
children 7f44dc58ebb9
files src/share/vm/classfile/klassFactory.cpp src/share/vm/trace/traceMacros.hpp
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/klassFactory.cpp	Tue Mar 01 23:47:30 2016 +0100
+++ b/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/src/share/vm/trace/traceMacros.hpp	Tue Mar 01 23:47:30 2016 +0100
+++ b/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)