lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Aug 2015 15:20:43 -0700
From:	Stephane Eranian <eranian@...gle.com>
To:	Andi Kleen <ak@...ux.intel.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"mingo@...e.hu" <mingo@...e.hu>, Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	"Liang, Kan" <kan.liang@...el.com>,
	David Ahern <dsahern@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH v1 4/4] perf script: enable printing of branch stack

On Wed, Aug 19, 2015 at 3:11 PM, Andi Kleen <ak@...ux.intel.com> wrote:
> On Wed, Aug 19, 2015 at 10:38:26AM +0200, Stephane Eranian wrote:
>> This patch improves perf script by enabling printing of the
>> branch stack via the 'brstack' argument to the field selection
>> option -F. The option is off by default and operates only if the
>> perf.data file has branch stack content.
>
> Thanks that's very useful. I wanted that several times.
>>
>> +static void print_sample_brstack(union perf_event *event __maybe_unused,
>> +                       struct perf_sample *sample,
>> +                       struct thread *thread __maybe_unused,
>> +                       struct perf_event_attr *attr __maybe_unused)
>> +{
>> +     struct branch_stack *br = sample->branch_stack;
>> +     u64 i;
>> +
>> +     if (!(br && br->nr))
>> +             return;
>> +
>> +     for (i = 0; i < br->nr; i++) {
>> +             printf(" 0x%"PRIx64"/0x%"PRIx64" ", br->entries[i].from, br->entries[i].to);
>
> Should print the various flags too. Also tip just added cycles information.
>
Ok, I will add that in v2.

> Also it would be good to resolve the addresses to symbol + offset

But then, that becomes harder to post-process or even read with long
C++ signatures.

> (and perhaps have support for srcline too).
>
>
> -Andi
> --
> ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ