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] [day] [month] [year] [list]
Date:   Mon, 23 Oct 2017 14:40:59 +0800
From:   zhangmengting <zhangmengting@...wei.com>
To:     David Ahern <dsahern@...il.com>,
        <linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
        <alexander.shishkin@...ux.intel.com>, <ak@...ux.intel.com>,
        <jolsa@...nel.org>, <namhyung@...nel.org>,
        <dsa@...ulusnetworks.com>, <wangnan0@...wei.com>,
        <huawei.libin@...wei.com>
Subject: Re: [PATCH] perf script: Add option to display guest samples in host

Hi all,
For sched_switch tracepoint, I guess maybe it would be more reasonable 
to show guest samples together with host samples by default, instead of 
setting an option to display guest samples when we meet with this 
confused situation.
To take care of this issue, the code should be changed as below:

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 0c977b6..dcfab00 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1557,7 +1557,7 @@ static int process_sample_event(struct perf_tool 
*tool,
          return -1;
      }

-    if (al.filtered)
+    if (al.filtered && !(strcmp(evsel->name, "sched:sched_switch")== 0 
&& perf_host &&(al.filtered & (1 << HIST_FILTER__GUEST))))
          goto out_put;

      if (cpu_list && !test_bit(sample->cpu, cpu_bitmap))

Right?

Thanks,
Mengting Zhang


On 2017/10/18 22:37, David Ahern wrote:
> On 10/18/17 1:09 AM, Mengting Zhang wrote:
>> @@ -2771,6 +2772,8 @@ int cmd_script(int argc, const char **argv)
>>   		    "Show context switch events (if recorded)"),
>>   	OPT_BOOLEAN('\0', "show-namespace-events", &script.show_namespace_events,
>>   		    "Show namespace events (if recorded)"),
>> +	OPT_BOOLEAN('\0', "show-guest-samples", &script.show_guest_samples,
>> +		    "Show guest samples (if recorded)"),
>>   	OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"),
>>   	OPT_INTEGER(0, "max-blocks", &max_blocks,
>>   		    "Maximum number of code blocks to dump with brstackinsn"),
> At this point we need a 'show-all' option.
>
> .
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ