Commit dd61a37a authored by Micha Müller's avatar Micha Müller
Browse files

Minor improvements to Caliper service:

-discard event-triggered snapshots. They are currently of no use for us
-increase log level of frequent but boring log messages
-extend patch to get rid of missing service warning
parent 5a4c8ea3
......@@ -133,6 +133,7 @@ private:
/* General service attributes */
unsigned snapshots_processed = 0;
unsigned snapshots_failed = 0;
unsigned snapshots_discarded = 0;
Attribute sampler_pc { Attribute::invalid };
Attribute timestamp { Attribute::invalid };
......@@ -250,7 +251,7 @@ private:
//check if symtab section found and if it is usable
if (scn == NULL || shdr.sh_entsize == 0) {
Log(1).stream() << chn->name() << ": DcdbPusher: \"" << filename
Log(2).stream() << chn->name() << ": DcdbPusher: \"" << filename
<< "\": No symbol table present. Falling back to dynamic symtab." << std::endl;
scn = NULL;
//Fall back to dynamic symbol table. This one should always be present
......@@ -519,7 +520,7 @@ private:
int& updateSymbolData = *(reinterpret_cast<int*>(static_cast<char*>(shm) + lookup_data_offset - sizeof(int)));
if (updateSymbolData != 0) {
Log(1).stream() << chn->name() << ": DcdbPusher: Updating symbol index" << std::endl;
Log(2).stream() << chn->name() << ": DcdbPusher: Updating symbol index" << std::endl;
if (!setup_shm(chn)) {
Log(1).stream() << chn->name() << ": DcdbPusher: Failed to setup shm"
<< std::endl;
......@@ -627,8 +628,6 @@ private:
void post_init_cb(Caliper* c, Channel* chn) {
// Check if required services sampler, timestamp and
// pthread are active by searching for identifying attributes.
//TODO support data collection if event triggered snapshots are used
sampler_pc = c->get_attribute("cali.sampler.pc");
timestamp = c->get_attribute("time.timestamp");
thread_id = c->get_attribute("pthread.id");
......@@ -756,6 +755,13 @@ private:
Entry timestamp_entry = sbuf->get(timestamp);
Entry sampler_pc_entry = sbuf->get(sampler_pc);
if (sampler_pc_entry.is_empty()) {
//must be event-triggered snapshot
++snapshots_discarded;
//Log(2).stream() << chn->name() << ": DcdbPusher: discarding event-triggered snapshot" << std::endl;
return;
}
//retrieve all information we need:
// *timestamp (from snapshot)
// *program counter (from snapshot)
......@@ -810,6 +816,7 @@ private:
Log(1).stream() << chn->name() << ": DcdbPusher: "
<< snapshots_processed << " snapshots processed of which "
<< snapshots_discarded << " were discarded and "
<< snapshots_failed << " failed." << std::endl;
snapshots_processed = 0;
......
......@@ -45,3 +45,14 @@
void print_detailed_stats(std::ostream& os) {
--- a/src/caliper/config_sanity_check.cpp
+++ b/src/caliper/config_sanity_check.cpp
@@ -45,7 +45,7 @@ namespace
const char* trigger_grp[] = { "event", "sampler", "libpfm", "alloc", nullptr };
const char* buffer_grp[] = { "aggregate", "trace", nullptr };
-const char* process_grp[] = { "aggregate", "trace", "textlog", nullptr };
+const char* process_grp[] = { "aggregate", "trace", "textlog", "dcdbpusher", nullptr };
const char* online_grp[] = { "textlog", nullptr };
const char* offline_grp[] = { "recorder", "report", "sos", "mpireport", nullptr };
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment