]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
snap
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 12 Dec 2025 18:23:38 +0000 (13:23 -0500)
committerFrank Ch. Eigler <fche@elastic.org>
Fri, 12 Dec 2025 18:23:38 +0000 (13:23 -0500)
src/stackprof.cxx

index f86549113e5256a171e151dccbd547bb87c1a823..e1756c1c637906ceebb50a7f2f69c387302f7fd0 100644 (file)
@@ -144,6 +144,17 @@ public:
   void process(const UnwindSample* sample); // accumulate hits / callgraph edges (need maxdepth=1 only)
 };
 
+
+class UnwindStatsConsumer: public UnwindSampleConsumer
+{
+public:
+ UnwindStatsConsumer() {}
+  ~UnwindStatsConsumer();
+  void process(const UnwindSample* sample);
+};
+
+
+
 // hypothetical: FlamegraphUnwindSampleConsumer, taking in a bigger maxdepth
 // hypothetical: PprofUnwindSampleConsumer, https://github.com/google/pprof
 
@@ -328,13 +339,19 @@ main (int argc, char *argv[])
               exit(1);
             }
         }
-      
-#if 0
+
       // Create the perf processing pipeline as per command line options
+#if 0
+      UnwindStatsConsumer usc;
+      PerfConsumerUnwinder pcu(&attr, &usc);
+      PerfReader pr(&attr, &pcu, pid);
+#endif
+#if 0
       GprofUnwindSampleConsumer usc;
       PerfConsumerUnwinder pcu(&attr, &usc);
       PerfReader pr(&attr, &pcu, pid);
-#else      
+#endif
+#if 1
       StatsPerfConsumer pcu;
       PerfReader pr(&attr, &pcu, pid);
 #endif