72 #define OPERATION_ASSIGN '=' 73 #define OPERATION_INCREMENT '+' 74 #define OPERATION_MIN '<' 75 #define OPERATION_MAX '>' 151 current_insert->
link = rv;
195 for(
int i=0; i < num; i++){
219 TMSG(METRICS_FINALIZE,
"metric_tbl[%d] = %s", l->id, l->val.name);
220 id2metric[l->id] = &(l->val);
226 TMSG(METRICS_FINALIZE,
"metric_proc[%d] = %p", l->id, l->proc);
235 null_metrics[i].
bits = 0;
254 if ((0 <= metric_id) && (metric_id <
n_metrics)) {
255 return id2metric[metric_id];
285 if ((0 <= metric_id) && (metric_id <
n_metrics)) {
307 pre_alloc = pre_alloc->
next;
325 m->
id = metric_data->
id;
329 return metric_data->
id;
349 if (l->id == metric_id) {
354 TMSG(METRICS,
"id = %d, name = %s, flags = %d, period = %d", metric_id, name, valFmt, period);
356 EMSG(
"Metric id is NULL (likely unallocated)");
360 EMSG(
"Must supply a name for metric");
367 mdesc->
name = (
char*) name;
380 if (l->id == metric_id){
399 uint8_t show, uint8_t show_percent)
443 if ((0 <= metric_id) && (metric_id <
n_metrics)) {
444 id2metric[metric_id]->
name = name;
467 if (s && (0 <=
id) && (
id <
n_metrics)) {
468 return &(s->
v1) +
id;
502 if ( (loc->
p && loc->
p > val.
p) ||
508 if (loc->
p < val.
p) {
int hpcrun_new_metric_of_kind(kind_info_t *kind)
static metric_upd_proc_t ** metric_proc_tbl
void hpcrun_set_metric_name(int metric_id, char *name)
static struct perf_mem_metric metric
const metric_desc_t metricDesc_NULL
static metric_proc_map_t * proc_map
MetricFlags_ValFmt_t valFmt
#define OPERATION_INCREMENT
void metric_upd_proc_t(int metric_id, metric_set_t *set, cct_metric_data_t datum)
static kind_info_t * current_insert
struct metric_proc_map_t * next
const hpcrun_metricFlags_t hpcrun_metricFlags_NULL
static metric_list_t * pre_alloc
void hpcrun_metric_std_set(int metric_id, metric_set_t *set, hpcrun_metricVal_t value)
int hpcrun_get_num_metrics()
void hpcrun_metric_std_min(int metric_id, metric_set_t *set, hpcrun_metricVal_t val)
static hpcrun_metricVal_t * null_metrics
static metric_desc_t ** id2metric
metric_desc_p_tbl_t * hpcrun_get_metric_tbl()
metric_desc_t * hpcrun_set_metric_info_and_period(int metric_id, const char *name, MetricFlags_ValFmt_t valFmt, size_t period, metric_desc_properties_t prop)
metric_upd_proc_t * hpcrun_get_metric_proc(int metric_id)
metric_desc_t * hpcrun_set_metric_and_attributes(int metric_id, const char *name, MetricFlags_ValFmt_t valFmt, size_t period, metric_desc_properties_t prop, uint8_t show, uint8_t show_percent)
struct kind_info_t kind_info_t
kind_info_t * hpcrun_metrics_new_kind(void)
struct metric_list_t * next
void hpcrun_metric_std_max(int metric_id, metric_set_t *set, hpcrun_metricVal_t val)
hpcrun_metricFlags_fields fields
bool hpcrun_metrics_finalized()
static kind_info_t * current_kind
void * hpcrun_malloc(size_t size)
cct_metric_data_t * hpcrun_metric_set_loc(metric_set_t *s, int id)
metric_list_t * hpcrun_get_metric_data()
static bool has_set_max_metrics
void hpcrun_metric_std(int metric_id, metric_set_t *set, char operation, hpcrun_metricVal_t val)
metric_desc_t * hpcrun_set_metric_info_w_fn(int metric_id, const char *name, MetricFlags_ValFmt_t valFmt, size_t period, metric_upd_proc_t upd_fn, metric_desc_properties_t prop)
metric_set_t * hpcrun_metric_set_new(void)
int hpcrun_new_metric(void)
metric_desc_t * hpcrun_set_metric_info(int metric_id, const char *name)
void hpcrun_finalize_metrics()
<!-- ********************************************************************--> n<!-- HPCToolkit Experiment DTD --> n<!-- Version 2.1 --> n<!-- ********************************************************************--> n<!ELEMENT HPCToolkitExperiment(Header,(SecCallPathProfile|SecFlatProfile) *)> n<!ATTLIST HPCToolkitExperiment\n version CDATA #REQUIRED > n n<!-- ******************************************************************--> n n<!-- Info/NV:flexible name-value pairs:(n) ame;(t) ype;(v) alue --> n<!ELEMENT Info(NV *)> n<!ATTLIST Info\n n CDATA #IMPLIED > n<!ELEMENT NV EMPTY > n<!ATTLIST NV\n n CDATA #REQUIRED\n t CDATA #IMPLIED\n v CDATA #REQUIRED > n n<!-- ******************************************************************--> n<!-- Header --> n<!-- ******************************************************************--> n<!ELEMENT Header(Info *)> n<!ATTLIST Header\n n CDATA #REQUIRED > n n<!-- ******************************************************************--> n<!-- Section Header --> n<!-- ******************************************************************--> n<!ELEMENT SecHeader(MetricTable?, MetricDBTable?, TraceDBTable?, LoadModuleTable?, FileTable?, ProcedureTable?, Info *)> n n<!-- MetricTable:--> n<!ELEMENT MetricTable(Metric) * > n n<!-- Metric:(i) d;(n) ame --> n<!--(v) alue-type:transient type of values --> n<!--(t) ype:persistent type of metric --> n<!-- fmt:format;show;--> n<!ELEMENT Metric(MetricFormula *, Info?)> n<!ATTLIST Metric\n i CDATA #REQUIRED\n n CDATA #REQUIRED\n es CDATA #IMPLIED\n em CDATA #IMPLIED\n ep CDATA #IMPLIED\n v(raw|final|derived-incr|derived) \"raw\\ t (inclusive|exclusive|nil) \nil\\ partner CDATA #IMPLIED\ fmt CDATA #IMPLIED\ show (1|0) \1\\ show-percent (1|0) \1> n n<!-- MetricFormula represents derived metrics: (t)ype; (frm): formula --> n<!ELEMENT MetricFormula (Info?)> n<!ATTLIST MetricFormula\ t (combine|finalize) \finalize\\ i CDATA #IMPLIED\ frm CDATA #REQUIRED> n n<!-- Metric data, used in sections: (n)ame [from Metric]; (v)alue --> n<!ELEMENT M EMPTY> n<!ATTLIST M\ n CDATA #REQUIRED\ v CDATA #REQUIRED> n n<!-- MetricDBTable: --> n<!ELEMENT MetricDBTable (MetricDB)*> n n<!-- MetricDB: (i)d; (n)ame --> n<!-- (t)ype: persistent type of metric --> n<!-- db-glob: file glob describing files in metric db --> n<!-- db-id: id within metric db --> n<!-- db-num-metrics: number of metrics in db --> n<!-- db-header-sz: size (in bytes) of a db file header --> n<!ELEMENT MetricDB EMPTY> n<!ATTLIST MetricDB\ i CDATA #REQUIRED\ n CDATA #REQUIRED\ t (inclusive|exclusive|nil) \nil\\ partner CDATA #IMPLIED\ db-glob CDATA #IMPLIED\ db-id CDATA #IMPLIED\ db-num-metrics CDATA #IMPLIED\ db-header-sz CDATA #IMPLIED> n n<!-- TraceDBTable: --> n<!ELEMENT TraceDBTable (TraceDB)> n n<!-- TraceDB: (i)d --> n<!-- db-min-time: min beginning time stamp (global) --> n<!-- db-max-time: max ending time stamp (global) --> n<!ELEMENT TraceDB EMPTY> n<!ATTLIST TraceDB\ i CDATA #REQUIRED\ db-glob CDATA #IMPLIED\ db-min-time CDATA #IMPLIED\ db-max-time CDATA #IMPLIED\ db-header-sz CDATA #IMPLIED> n n<!-- LoadModuleTable assigns a short name to a load module --> n<!ELEMENT LoadModuleTable (LoadModule)*> n n<!ELEMENT LoadModule (Info?)> n<!ATTLIST LoadModule\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!-- FileTable assigns a short name to a file --> n<!ELEMENT FileTable (File)*> n n<!ELEMENT File (Info?)> n<!ATTLIST File\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!-- ProcedureTable assigns a short name to a procedure --> n<!ELEMENT ProcedureTable (Procedure)*> n n<!-- Info/NV: flexible name-value pairs: (n)ame; (t)ype; (v)alue --> n<!-- f: family of the procedure (fake, root, ...)--> n<!ELEMENT Procedure (Info?)> n<!ATTLIST Procedure\ i CDATA #REQUIRED\ n CDATA #REQUIRED\ f CDATA #IMPLIED> n n<!-- ****************************************************************** --> n<!-- Section: Call path profile --> n<!-- ****************************************************************** --> n<!ELEMENT SecCallPathProfile (SecHeader, SecCallPathProfileData)> n<!ATTLIST SecCallPathProfile\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!ELEMENT SecCallPathProfileData (PF|M)*> n<!-- Procedure frame --> n<!-- (i)d: unique identifier for cross referencing --> n<!-- (s)tatic scope id --> n<!-- (n)ame: a string or an id in ProcedureTable --> n<!-- (lm) load module: a string or an id in LoadModuleTable --> n<!-- (f)ile name: a string or an id in LoadModuleTable --> n<!-- (l)ine range: \beg-end\ (inclusive range) --> n<!-- (a)lien: whether frame is alien to enclosing P --> n<!-- (str)uct: hpcstruct node id --> n<!-- (t)ype: hpcrun node type: memory access, variable declaration, ... --> n<!-- (v)ma-range-set: \{[beg-end), [beg-end)...}\ --> n<!ELEMENT PF (PF|Pr|L|C|S|M)*> n<!ATTLIST PF\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ n CDATA #REQUIRED\ lm CDATA #IMPLIED\ f CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Procedure (static): GOAL: replace with 'P' --> n<!ELEMENT Pr (Pr|L|C|S|M)*> n<!ATTLIST Pr\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ n CDATA #REQUIRED\ lm CDATA #IMPLIED\ f CDATA #IMPLIED\ l CDATA #IMPLIED\ a (1|0) \0\\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Callsite (a special StatementRange) --> n<!ELEMENT C (PF|M)*> n<!ATTLIST C\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n n<!-- ****************************************************************** --> n<!-- Section: Flat profile --> n<!-- ****************************************************************** --> n<!ELEMENT SecFlatProfile (SecHeader, SecFlatProfileData)> n<!ATTLIST SecFlatProfile\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!ELEMENT SecFlatProfileData (LM|M)*> n<!-- Load module: (i)d; (n)ame; (v)ma-range-set --> n<!ELEMENT LM (F|P|M)*> n<!ATTLIST LM\ i CDATA #IMPLIED\ n CDATA #REQUIRED\ v CDATA #IMPLIED> n<!-- File --> n<!ELEMENT F (P|L|S|M)*> n<!ATTLIST F\ i CDATA #IMPLIED\ n CDATA #REQUIRED> n<!-- Procedure (Note 1) --> n<!ELEMENT P (P|A|L|S|C|M)*> n<!ATTLIST P\ i CDATA #IMPLIED\ n CDATA #REQUIRED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Alien (Note 1) --> n<!ELEMENT A (A|L|S|C|M)*> n<!ATTLIST A\ i CDATA #IMPLIED\ f CDATA #IMPLIED\ n CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Loop (Note 1,2) --> n<!ELEMENT L (A|Pr|L|S|C|M)*> n<!ATTLIST L\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ f CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Statement (Note 2) --> n<!-- (it): trace record identifier --> n<!ELEMENT S (S|M)*> n<!ATTLIST S\ i CDATA #IMPLIED\ it CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Note 1: Contained Cs may not contain PFs --> n<!-- Note 2: The 's' attribute is not used for flat profiles --> n
void monitor_real_abort(void)
metric_desc_properties_t properties
void hpcrun_pre_allocate_metrics(size_t num)
static metric_desc_p_tbl_t metric_tbl
void hpcrun_metric_std_inc(int metric_id, metric_set_t *set, hpcrun_metricVal_t incr)
hpcrun_metricFlags_t flags
void hpcrun_metrics_switch_kind(kind_info_t *kind)
static metric_list_t * metric_data
metric_desc_t * hpcrun_id2metric(int metric_id)
#define metric_property_none
void hpcrun_metric_set_dense_copy(cct_metric_data_t *dest, metric_set_t *set, int num_metrics)