Skip to content

Commit 8042b6f

Browse files
committed
Added function to ADEvent to compute the number of events in the call list
Periodic perf output now includes the number of events in the call list maintained after the purge and the number of unmatched correlation IDs
1 parent 3666092 commit 8042b6f

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

include/chimbuko/ad/ADEvent.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ namespace chimbuko {
281281
*/
282282
CallListMap_p_t* trimCallList(int n_keep_thread = 0);
283283

284+
/**
285+
* @brief Get the total number of function events in the call list over all pid/rid/tid
286+
*/
287+
size_t getCallListSize() const;
284288

285289
/**
286290
* @brief purge all function calls that are completed (i.e. a pair of ENTRY and EXIT events are observed)

src/ad/ADEvent.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,17 @@ void ADEvent::purgeCallList(int n_keep_thread) {
416416
m_execDataMap.clear();
417417
}
418418

419-
419+
size_t ADEvent::getCallListSize() const{
420+
size_t out = 0;
421+
for (auto& it_p : m_callList) {
422+
for (auto& it_r : it_p.second) {
423+
for (auto& it_t: it_r.second) {
424+
out += it_t.second.size();
425+
}
426+
}
427+
}
428+
return out;
429+
}
420430

421431

422432
CallListIterator_t ADEvent::getCallData(const eventID &event_id) const{

src/chimbuko.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,10 @@ void Chimbuko::run(unsigned long long& n_func_events,
569569

570570
m_perf_prd.add("io_steps", n_steps_accum_prd);
571571

572+
//Write out how many events remain in the ExecData and how many unmatched correlation IDs there are
573+
m_perf_prd.add("call_list_carryover_size", m_event->getCallListSize());
574+
m_perf_prd.add("n_unmatched_correlation_id", m_event->getUnmatchCorrelationIDevents().size());
575+
572576
//Write accumulated outlier count
573577
m_perf_prd.add("outlier_count", n_outliers_accum_prd);
574578

0 commit comments

Comments
 (0)