|
@@ -428,7 +428,6 @@ class PerfLongVariant : public PerfLong { |
|
|
inline void inc(jlong val) { (*(jlong*)_valuep) += val; } |
|
|
inline void dec(jlong val) { inc(-val); } |
|
|
inline void add(jlong val) { (*(jlong*)_valuep) += val; } |
|
|
void clear_sample_helper() { _sample_helper = NULL; } |
|
|
}; |
|
|
|
|
|
/* |
|
@@ -684,22 +683,17 @@ class PerfDataManager : AllStatic { |
|
|
// return the list of all known PerfData items that are to be |
|
|
// sampled by the StatSampler. |
|
|
static PerfDataList* sampled(); |
|
|
static inline int sampled_count(); |
|
|
|
|
|
// return the list of all known PerfData items that have a |
|
|
// variability classification of type Constant |
|
|
static PerfDataList* constants(); |
|
|
static inline int constants_count(); |
|
|
|
|
|
public: |
|
|
|
|
|
// method to check for the existence of a PerfData item with |
|
|
// the given name. |
|
|
static inline bool exists(const char* 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]; |
|
@@ -713,9 +707,6 @@ class PerfDataManager : AllStatic { |
|
|
static bool is_unstable_supported(CounterNS ns) { |
|
|
return (ns != NULL_NS) && ((ns % 3) == COM_NS); |
|
|
} |
|
|
static bool is_unstable_unsupported(CounterNS ns) { |
|
|
return (ns == NULL_NS) || ((ns % 3) == SUN_NS); |
|
|
} |
|
|
|
|
|
// methods to test the interface stability of a given counter name |
|
|
// |
|
@@ -727,9 +718,6 @@ class PerfDataManager : AllStatic { |
|
|
const char* comdot = "com.sun."; |
|
|
return strncmp(name, comdot, strlen(comdot)) == 0; |
|
|
} |
|
|
static bool is_unstable_unsupported(const char* name) { |
|
|
return !(is_stable_supported(name) && is_unstable_supported(name)); |
|
|
} |
|
|
|
|
|
// method to construct counter name strings in a given name space. |
|
|
// The string object is allocated from the Resource Area and calls |
|
@@ -913,21 +901,13 @@ class PerfTraceTime : public StackObj { |
|
|
protected: |
|
|
elapsedTimer _t; |
|
|
PerfLongCounter* _timerp; |
|
|
// pointer to thread-local or global recursion counter variable |
|
|
int* _recursion_counter; |
|
|
|
|
|
public: |
|
|
inline PerfTraceTime(PerfLongCounter* timerp) : _timerp(timerp), _recursion_counter(NULL) { |
|
|
inline PerfTraceTime(PerfLongCounter* timerp) : _timerp(timerp) { |
|
|
if (!UsePerfData) return; |
|
|
_t.start(); |
|
|
} |
|
|
|
|
|
inline PerfTraceTime(PerfLongCounter* timerp, int* recursion_counter) : _timerp(timerp), _recursion_counter(recursion_counter) { |
|
|
if (!UsePerfData || (_recursion_counter != NULL && |
|
|
(*_recursion_counter)++ > 0)) return; |
|
|
_t.start(); |
|
|
} |
|
|
|
|
|
inline void suspend() { if (!UsePerfData) return; _t.stop(); } |
|
|
inline void resume() { if (!UsePerfData) return; _t.start(); } |
|
|
|
|
@@ -964,10 +944,6 @@ class PerfTraceTimedEvent : public PerfTraceTime { |
|
|
_eventp->inc(); |
|
|
} |
|
|
|
|
|
inline PerfTraceTimedEvent(PerfLongCounter* timerp, PerfLongCounter* eventp, int* recursion_counter): PerfTraceTime(timerp, recursion_counter), _eventp(eventp) { |
|
|
if (!UsePerfData) return; |
|
|
_eventp->inc(); |
|
|
} |
|
|
}; |
|
|
|
|
|
#endif // SHARE_RUNTIME_PERFDATA_HPP |