--- a/hotspot/src/share/vm/classfile/verifier.cpp Fri May 29 21:49:02 2015 +0200
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Fri May 29 23:19:42 2015 +0200
@@ -45,6 +45,8 @@
#include "runtime/javaCalls.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
+#include "runtime/thread.hpp"
+#include "services/threadService.hpp"
#include "utilities/bytes.hpp"
#define NOFAILOVER_MAJOR_VERSION 51
@@ -130,6 +132,16 @@
return true;
}
+ // Timer includes any side effects of class verification (resolution,
+ // etc), but not recursive calls to Verifier::verify().
+ JavaThread* jt = (JavaThread*)THREAD;
+ PerfClassTraceTime timer(ClassLoader::perf_class_verify_time(),
+ ClassLoader::perf_class_verify_selftime(),
+ ClassLoader::perf_classes_verified(),
+ jt->get_thread_stat()->perf_recursion_counts_addr(),
+ jt->get_thread_stat()->perf_timers_addr(),
+ PerfClassTraceTime::CLASS_VERIFY);
+
// If the class should be verified, first see if we can use the split
// verifier. If not, or if verification fails and FailOverToOldVerifier
// is set, then call the inference verifier.
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Fri May 29 21:49:02 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Fri May 29 23:19:42 2015 +0200
@@ -622,14 +622,6 @@
if (!this_k->is_linked()) {
if (!this_k->is_rewritten()) {
{
- // Timer includes any side effects of class verification (resolution,
- // etc), but not recursive entry into verify_code().
- PerfClassTraceTime timer(ClassLoader::perf_class_verify_time(),
- ClassLoader::perf_class_verify_selftime(),
- ClassLoader::perf_classes_verified(),
- jt->get_thread_stat()->perf_recursion_counts_addr(),
- jt->get_thread_stat()->perf_timers_addr(),
- PerfClassTraceTime::CLASS_VERIFY);
bool verify_ok = verify_code(this_k, throw_verifyerror, THREAD);
if (!verify_ok) {
return false;