From: Serhei Makarov Date: Thu, 2 Apr 2026 17:10:30 +0000 (-0400) Subject: src/stackprof.cxx: more REVIEW TODO_AMEND X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=614beed90e096851303849ae85143eac4aa362be;p=thirdparty%2Felfutils.git src/stackprof.cxx: more REVIEW TODO_AMEND --- diff --git a/src/stackprof.cxx b/src/stackprof.cxx index dde54f03..73ed84c0 100644 --- a/src/stackprof.cxx +++ b/src/stackprof.cxx @@ -376,9 +376,6 @@ class UnwindStatsConsumer: public UnwindSampleConsumer { UnwindStatsTable *stats; - /* TODO(REVIEW.4) subsumed by stats? might want to remove */ - unordered_map event_unwind_counts; - public: UnwindStatsConsumer(UnwindStatsTable *usc) : stats(usc) {} ~UnwindStatsConsumer(); @@ -1614,7 +1611,7 @@ UnwindStatsConsumer::~UnwindStatsConsumer() void UnwindStatsConsumer::process(const UnwindSample* sample) { - this->event_unwind_counts[sample->pid] ++; + /* Most of the logic is handled by UnwindStatsTable. */ } int UnwindStatsConsumer::maxframes() @@ -1926,6 +1923,9 @@ void GprofUnwindSampleConsumer::record_gmon_out(const string& buildid, UnwindMod GprofUnwindSampleConsumer::~GprofUnwindSampleConsumer() { + if (show_summary) + this->stats->print_summary (); + if (show_summary) { clog << "\n=== buildid / sample counts ===\n";