changeset 4238:bc34e24e0637

8007804: Need to be able to access Performance counter by name from JVM Reviewed-by: dholmes, sla, sspitsyn
author nloodin
date Wed, 20 Feb 2013 11:24:18 +0100
parents 5e48fb5e9625
children eb911d21c6b1
files src/share/vm/runtime/perfData.cpp src/share/vm/runtime/perfData.hpp
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/perfData.cpp	Tue Feb 19 16:03:07 2013 -0800
+++ b/src/share/vm/runtime/perfData.cpp	Wed Feb 20 11:24:18 2013 +0100
@@ -320,6 +320,10 @@
   }
 }
 
+PerfData* PerfDataManager::find_by_name(const char* name) {
+  return _all->find_by_name(name);
+}
+
 PerfDataList* PerfDataManager::all() {
 
   MutexLocker ml(PerfDataManager_lock);
--- a/src/share/vm/runtime/perfData.hpp	Tue Feb 19 16:03:07 2013 -0800
+++ b/src/share/vm/runtime/perfData.hpp	Wed Feb 20 11:24:18 2013 +0100
@@ -692,6 +692,9 @@
     // the given name.
     static bool exists(const char* name) { return _all->contains(name); }
 
+    // method to search for a instrumentation object by name
+    static PerfData* find_by_name(const char* name);
+
     // method to map a CounterNS enumeration to a namespace string
     static const char* ns_to_string(CounterNS ns) {
       return _name_spaces[ns];