mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf stat: add branch performance counters to default
@ 2009-10-19 10:03 Tim Blechmann
  2009-10-19 11:23 ` Ingo Molnar
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Tim Blechmann @ 2009-10-19 10:03 UTC (permalink / raw)
  To: linux-kernel, Paul Mackerras, Ingo Molnar, Peter Zijlstra


[-- Attachment #1.1: Type: text/plain, Size: 429 bytes --]

not sure, whether there is any reason, why the branch performance
counters are not enabled by default.
personally, i would find it quite useful, though

--

this patch adds performance counter information about branches and
branch misses to the default output of perf stat.

Signed-off-by: Tim Blechmann <tim@klingt.org>
---
 tools/perf/builtin-stat.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-perf-stat-add-branch-performance-counters-to-default.patch --]
[-- Type: text/x-patch; name="0001-perf-stat-add-branch-performance-counters-to-default.patch", Size: 629 bytes --]

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index e874ad4..671bfaa 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -57,6 +57,8 @@ static struct perf_counter_attr default_attrs[] = {
   { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_INSTRUCTIONS	},
   { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_CACHE_REFERENCES},
   { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_CACHE_MISSES	},
+  { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_BRANCH_INSTRUCTIONS},
+  { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_BRANCH_MISSES	},
 
 };
 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-10-19 11:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19 10:03 [PATCH] perf stat: add branch performance counters to default Tim Blechmann
2009-10-19 11:23 ` Ingo Molnar
2009-10-19 11:43   ` Ingo Molnar
2009-10-19 11:47 ` [tip:perf/core] perf stat: Add branch performance events to default output tip-bot for Tim Blechmann
2009-10-19 11:47 ` [tip:perf/core] perf stat: Re-align the default_attrs[] array tip-bot for Ingo Molnar
2009-10-19 11:47 ` [tip:perf/core] perf stat: Count branches first tip-bot for Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome