comparison src/share/vm/runtime/dtraceJSDT.cpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents b8a4e1d372a0
children
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
65 assert(probe != NULL, "valid probe"); 65 assert(probe != NULL, "valid probe");
66 assert(probe->method != NULL, "valid method"); 66 assert(probe->method != NULL, "valid method");
67 assert(probe->name != NULL, "valid probe name"); 67 assert(probe->name != NULL, "valid probe name");
68 assert(probe->function != NULL, "valid probe function spec"); 68 assert(probe->function != NULL, "valid probe function spec");
69 methodHandle h_method = 69 methodHandle h_method =
70 methodHandle(THREAD, JNIHandles::resolve_jmethod_id(probe->method)); 70 methodHandle(THREAD, Method::resolve_jmethod_id(probe->method));
71 nmethod* nm = AdapterHandlerLibrary::create_dtrace_nmethod(h_method); 71 nmethod* nm = AdapterHandlerLibrary::create_dtrace_nmethod(h_method);
72 if (nm == NULL) { 72 if (nm == NULL) {
73 delete probes; 73 delete probes;
74 THROW_MSG_0(vmSymbols::java_lang_RuntimeException(), 74 THROW_MSG_0(vmSymbols::java_lang_RuntimeException(),
75 "Unable to register DTrace probes (CodeCache: no room for DTrace nmethods)."); 75 "Unable to register DTrace probes (CodeCache: no room for DTrace nmethods).");
90 probes->set_helper_handle(handle); 90 probes->set_helper_handle(handle);
91 return RegisteredProbes::toOpaqueProbes(probes); 91 return RegisteredProbes::toOpaqueProbes(probes);
92 } 92 }
93 93
94 jboolean DTraceJSDT::is_probe_enabled(jmethodID method) { 94 jboolean DTraceJSDT::is_probe_enabled(jmethodID method) {
95 methodOop m = JNIHandles::resolve_jmethod_id(method); 95 Method* m = Method::resolve_jmethod_id(method);
96 return nativeInstruction_at(m->code()->trap_address())->is_dtrace_trap(); 96 return nativeInstruction_at(m->code()->trap_address())->is_dtrace_trap();
97 } 97 }
98 98
99 void DTraceJSDT::dispose(OpaqueProbes probes) { 99 void DTraceJSDT::dispose(OpaqueProbes probes) {
100 RegisteredProbes* p = RegisteredProbes::toRegisteredProbes(probes); 100 RegisteredProbes* p = RegisteredProbes::toRegisteredProbes(probes);