From 4f76d3471c8fbedf41fb8e7cd74a7e76051a6a64 Mon Sep 17 00:00:00 2001 From: ccheung Date: Thu, 2 May 2013 16:55:00 -0700 Subject: [PATCH] 8012641: Perf_CreateLong creates perf counter of incorrect type Reviewed-by: mchung, hseigel, coleenp --- src/share/vm/prims/perf.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/share/vm/prims/perf.cpp b/src/share/vm/prims/perf.cpp index e0326f774..6318d9d66 100644 --- a/src/share/vm/prims/perf.cpp +++ b/src/share/vm/prims/perf.cpp @@ -142,20 +142,20 @@ PERF_ENTRY(jobject, Perf_CreateLong(JNIEnv *env, jobject perf, jstring name, } switch(variability) { - case 1: /* V_Constant */ + case PerfData::V_Constant: pl = PerfDataManager::create_long_constant(NULL_NS, (char *)name_utf, (PerfData::Units)units, value, CHECK_NULL); break; - case 2: /* V_Variable */ - pl = PerfDataManager::create_long_variable(NULL_NS, (char *)name_utf, + case PerfData::V_Monotonic: + pl = PerfDataManager::create_long_counter(NULL_NS, (char *)name_utf, (PerfData::Units)units, value, CHECK_NULL); break; - case 3: /* V_Monotonic Counter */ - pl = PerfDataManager::create_long_counter(NULL_NS, (char *)name_utf, + case PerfData::V_Variable: + pl = PerfDataManager::create_long_variable(NULL_NS, (char *)name_utf, (PerfData::Units)units, value, CHECK_NULL); break; -- GitLab