< prev index next >

src/hotspot/share/gc/shared/collectorCounters.cpp

Print this page

50     _time = PerfDataManager::create_counter(SUN_GC, cname, PerfData::U_Ticks,
51                                             CHECK);
52 
53     cname = PerfDataManager::counter_name(_name_space, "lastEntryTime");
54     _last_entry_time = PerfDataManager::create_variable(SUN_GC, cname,
55                                                         PerfData::U_Ticks,
56                                                         CHECK);
57 
58     cname = PerfDataManager::counter_name(_name_space, "lastExitTime");
59     _last_exit_time = PerfDataManager::create_variable(SUN_GC, cname,
60                                                        PerfData::U_Ticks,
61                                                        CHECK);
62   }
63 }
64 
65 CollectorCounters::~CollectorCounters() {
66   FREE_C_HEAP_ARRAY(char, _name_space);
67 }
68 
69 TraceCollectorStats::TraceCollectorStats(CollectorCounters* c) :
70     PerfTraceTimedEvent(c->time_counter(), c->invocation_counter()),
71     _c(c) {
72 
73   if (UsePerfData) {
74      _c->last_entry_counter()->set_value(os::elapsed_counter());
75   }
76 }
77 
78 TraceCollectorStats::~TraceCollectorStats() {
79   if (UsePerfData) {
80     _c->last_exit_counter()->set_value(os::elapsed_counter());
81   }
82 }

50     _time = PerfDataManager::create_counter(SUN_GC, cname, PerfData::U_Ticks,
51                                             CHECK);
52 
53     cname = PerfDataManager::counter_name(_name_space, "lastEntryTime");
54     _last_entry_time = PerfDataManager::create_variable(SUN_GC, cname,
55                                                         PerfData::U_Ticks,
56                                                         CHECK);
57 
58     cname = PerfDataManager::counter_name(_name_space, "lastExitTime");
59     _last_exit_time = PerfDataManager::create_variable(SUN_GC, cname,
60                                                        PerfData::U_Ticks,
61                                                        CHECK);
62   }
63 }
64 
65 CollectorCounters::~CollectorCounters() {
66   FREE_C_HEAP_ARRAY(char, _name_space);
67 }
68 
69 TraceCollectorStats::TraceCollectorStats(CollectorCounters* c) :
70     PerfTraceElapsedTimeEvent(c->time_counter(), c->invocation_counter()),
71     _c(c) {
72 
73   if (UsePerfData) {
74      _c->last_entry_counter()->set_value(os::elapsed_counter());
75   }
76 }
77 
78 TraceCollectorStats::~TraceCollectorStats() {
79   if (UsePerfData) {
80     _c->last_exit_counter()->set_value(os::elapsed_counter());
81   }
82 }
< prev index next >