]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
src/stackprof.cxx: more REVIEW TODO_AMEND
authorSerhei Makarov <serhei@serhei.io>
Thu, 2 Apr 2026 17:10:30 +0000 (13:10 -0400)
committerSerhei Makarov <serhei@serhei.io>
Thu, 2 Apr 2026 17:13:57 +0000 (13:13 -0400)
src/stackprof.cxx

index dde54f03c6341acb19fa31c291fd8dd11faced01..73ed84c033412a96185dd89805cea1550a73d1db 100644 (file)
@@ -376,9 +376,6 @@ class UnwindStatsConsumer: public UnwindSampleConsumer
 {
   UnwindStatsTable *stats;
 
-  /* TODO(REVIEW.4) subsumed by stats? might want to remove  */
-  unordered_map<int/*pid*/,unsigned> 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";