< prev index next > src/hotspot/os/windows/os_perf_windows.cpp
Print this page
*query = NULL;
}
}
static CounterQueryP create_counter_query() {
! CounterQueryP const query = NEW_C_HEAP_ARRAY(CounterQueryS, 1, mtInternal);
memset(query, 0, sizeof(CounterQueryS));
return query;
}
static void destroy_counter_query(CounterQueryP query) {
*query = NULL;
}
}
static CounterQueryP create_counter_query() {
! CounterQueryP const query = NEW_C_HEAP_OBJ(CounterQueryS, mtInternal);
memset(query, 0, sizeof(CounterQueryS));
return query;
}
static void destroy_counter_query(CounterQueryP query) {
pdh_cleanup(&query->query.query, &query->counter);
FREE_C_HEAP_ARRAY(CounterQueryS, query);
}
static MultiCounterQueryP create_multi_counter_query() {
! MultiCounterQueryP const query = NEW_C_HEAP_ARRAY(MultiCounterQueryS, 1, mtInternal);
memset(query, 0, sizeof(MultiCounterQueryS));
return query;
}
static void destroy_counter_query(MultiCounterQueryP counter_query) {
pdh_cleanup(&query->query.query, &query->counter);
FREE_C_HEAP_ARRAY(CounterQueryS, query);
}
static MultiCounterQueryP create_multi_counter_query() {
! MultiCounterQueryP const query = NEW_C_HEAP_OBJ(MultiCounterQueryS, mtInternal);
memset(query, 0, sizeof(MultiCounterQueryS));
return query;
}
static void destroy_counter_query(MultiCounterQueryP counter_query) {
static int allocate_counters(MultiCounterQueryP query, size_t nofCounters) {
assert(query != NULL, "invariant");
assert(!query->initialized, "invariant");
assert(0 == query->noOfCounters, "invariant");
assert(query->counters == NULL, "invariant");
! query->counters = (HCOUNTER*)NEW_C_HEAP_ARRAY(char, nofCounters * sizeof(HCOUNTER), mtInternal);
if (query->counters == NULL) {
return OS_ERR;
}
memset(query->counters, 0, nofCounters * sizeof(HCOUNTER));
query->noOfCounters = (int)nofCounters;
static int allocate_counters(MultiCounterQueryP query, size_t nofCounters) {
assert(query != NULL, "invariant");
assert(!query->initialized, "invariant");
assert(0 == query->noOfCounters, "invariant");
assert(query->counters == NULL, "invariant");
! query->counters = NEW_C_HEAP_ARRAY(HCOUNTER, nofCounters, mtInternal);
if (query->counters == NULL) {
return OS_ERR;
}
memset(query->counters, 0, nofCounters * sizeof(HCOUNTER));
query->noOfCounters = (int)nofCounters;
static ProcessQueryP create_process_query() {
const int current_process_idx = current_query_index_for_process();
if (OS_ERR == current_process_idx) {
return NULL;
}
! ProcessQueryP const process_query = NEW_C_HEAP_ARRAY(ProcessQueryS, 1, mtInternal);
memset(process_query, 0, sizeof(ProcessQueryS));
process_query->set.queries = NEW_C_HEAP_ARRAY(MultiCounterQueryS, current_process_idx + 1, mtInternal);
memset(process_query->set.queries, 0, sizeof(MultiCounterQueryS) * (current_process_idx + 1));
process_query->process_index = current_process_idx;
process_query->set.size = current_process_idx + 1;
static ProcessQueryP create_process_query() {
const int current_process_idx = current_query_index_for_process();
if (OS_ERR == current_process_idx) {
return NULL;
}
! ProcessQueryP const process_query = NEW_C_HEAP_OBJ(ProcessQueryS, mtInternal);
memset(process_query, 0, sizeof(ProcessQueryS));
process_query->set.queries = NEW_C_HEAP_ARRAY(MultiCounterQueryS, current_process_idx + 1, mtInternal);
memset(process_query->set.queries, 0, sizeof(MultiCounterQueryS) * (current_process_idx + 1));
process_query->process_index = current_process_idx;
process_query->set.size = current_process_idx + 1;
< prev index next >