From: Andi Kleen <andi@firstfloor.org>
To: acme@kernel.org
Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org,
namhyung@kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 9/9] test patch: Add fake branch cycles to input data in report/top
Date: Sat, 18 Jul 2015 08:24:54 -0700 [thread overview]
Message-ID: <1437233094-12844-10-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1437233094-12844-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
Not to be merged, but useful for testing if you don't have
hardware with cycles branch stack support.
---
tools/perf/util/hist.c | 2 +-
tools/perf/util/machine.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index a6e9ddd..8a4bf84 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1421,7 +1421,7 @@ void hist__account_cycles(struct branch_stack *bs, struct addr_location *al,
struct branch_info *bi;
/* If we have branch cycles always annotate them. */
- if (bs && bs->nr && bs->entries[0].flags.cycles) {
+ if (bs && bs->nr /* && bs->entries[0].flags.cycles */) {
int i;
bi = sample__resolve_bstack(sample, al);
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 7ff6827..1351f19 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1597,6 +1597,8 @@ struct branch_info *sample__resolve_bstack(struct perf_sample *sample,
ip__resolve_ams(al->thread, &bi[i].to, bs->entries[i].to);
ip__resolve_ams(al->thread, &bi[i].from, bs->entries[i].from);
bi[i].flags = bs->entries[i].flags;
+ if (bi[i].flags.cycles == 0)
+ bi[i].flags.cycles = 123;
}
return bi;
}
--
2.4.3
next prev parent reply other threads:[~2015-07-18 15:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 15:24 Cycles annotation support for perf tools v3 Andi Kleen
2015-07-18 15:24 ` [PATCH 1/9] perf, tools: Add tools support for cycles, weight branch_info field Andi Kleen
2015-08-07 7:19 ` [tip:perf/core] perf tools: Add " tip-bot for Andi Kleen
2015-07-18 15:24 ` [PATCH 2/9] perf, tools, report: Add flag for non ANY branch mode Andi Kleen
2015-08-07 7:19 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2015-07-18 15:24 ` [PATCH 3/9] perf, tools, report: Add infrastructure for a cycles histogram Andi Kleen
2015-08-07 7:20 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2015-07-18 15:24 ` [PATCH 4/9] perf, tools, report: Add processing for cycle histograms Andi Kleen
2015-08-07 7:20 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2015-07-18 15:24 ` [PATCH 5/9] perf, tools: Compute IPC and basic block cycles for annotate Andi Kleen
2015-08-07 7:20 ` [tip:perf/core] perf annotate: Compute IPC and basic block cycles tip-bot for Andi Kleen
2016-06-30 8:53 ` [PATCH 5/9] perf, tools: Compute IPC and basic block cycles for annotate Peter Zijlstra
2016-07-02 20:38 ` Andi Kleen
2015-07-18 15:24 ` [PATCH 6/9] perf, tools, annotate: Finally display IPC and cycle accounting Andi Kleen
2015-08-07 7:21 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2015-07-18 15:24 ` [PATCH 7/9] perf, tools, top: Add branch annotation code to top Andi Kleen
2015-08-07 7:21 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2015-07-18 15:24 ` [PATCH 8/9] perf, tools, report: Display cycles in branch sort mode Andi Kleen
2015-08-07 7:21 ` [tip:perf/core] perf " tip-bot for Andi Kleen
2015-07-18 15:24 ` Andi Kleen [this message]
2015-08-06 19:44 ` Cycles annotation support for perf tools v3 Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437233094-12844-10-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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