mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: Re: [PATCH 1/2] perf evsel: Fix probing of precise_ip level for default cycles event
Date: Wed, 14 Jun 2017 07:45:01 +0200	[thread overview]
Message-ID: <20170614054500.exocsybw2qkug5tn@gmail.com> (raw)
In-Reply-To: <20170613232343.4365-2-acme@kernel.org>


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

>  tools/perf/tests/task-exit.c | 2 +-
>  tools/perf/util/evsel.c      | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c
> index 32873ec91a4e..cf00ebad2ef5 100644
> --- a/tools/perf/tests/task-exit.c
> +++ b/tools/perf/tests/task-exit.c
> @@ -83,7 +83,7 @@ int test__task_exit(int subtest __maybe_unused)
>  
>  	evsel = perf_evlist__first(evlist);
>  	evsel->attr.task = 1;
> -	evsel->attr.sample_freq = 0;
> +	evsel->attr.sample_freq = 1;
>  	evsel->attr.inherit = 0;
>  	evsel->attr.watermark = 0;
>  	evsel->attr.wakeup_events = 1;
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index e4f7902d5afa..a7ce529ca36c 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -273,6 +273,11 @@ struct perf_evsel *perf_evsel__new_cycles(void)
>  	struct perf_evsel *evsel;
>  
>  	event_attr_init(&attr);
> +	/*
> +	 * Unnamed union member, not supported as struct member named
> +	 * initializer in older compilers such as gcc 4.4.7
> +	 */
> +	attr.sample_period = 1;
>  
>  	perf_event_attr__set_max_precise_ip(&attr);

Hm, so this really broke perf for me on my main system - 'perf top' and 'perf 
report' only shows:

 triton:~/tip> perf report --stdio
 unwind: target platform=x86 is not supported
 unwind: target platform=x86 is not supported
 unwind: target platform=x86 is not supported
 unwind: target platform=x86 is not supported
 unwind: target platform=x86 is not supported
 unwind: target platform=x86 is not supported
 unwind: target platform=x86 is not supported
 unwind: target platform=x86 is not supported
 # To display the perf.data header info, please use --header/--header-only options.
 #
 #
 # Total Lost Samples: 0
 #
 # Samples: 921K of event 'cycles:ppp'
 # Event count (approx.): 921045
 #
 # Overhead  Command    Shared Object     Symbol              
 # ........  .........  ................  ....................
 #
    99.93%  hackbench  [kernel.vmlinux]  [k] native_write_msr
     0.07%  perf       [kernel.vmlinux]  [k] native_write_msr

the bisection result is unambiguous:

   7fd1d092b4337831d7ccbf3a74c07cb0b2089023 is the first bad commit

proper output would be:

 ...
 #
 # Total Lost Samples: 0
 #
 # Samples: 9K of event 'cycles'
 # Event count (approx.): 4378583062
 #
 # Overhead  Command    Shared Object     Symbol                                 
 # ........  .........  ................  .......................................
 #
     4.32%  hackbench  [kernel.vmlinux]  [k] copy_user_enhanced_fast_string
     4.02%  hackbench  [kernel.vmlinux]  [k] unix_stream_read_generic
     3.75%  hackbench  [kernel.vmlinux]  [k] filemap_map_pages
     3.06%  hackbench  [kernel.vmlinux]  [k] __check_object_size
     2.44%  hackbench  [kernel.vmlinux]  [k] _raw_spin_lock_irqsave
     2.32%  hackbench  [kernel.vmlinux]  [k] native_queued_spin_lock_slowpath
     2.22%  hackbench  [kernel.vmlinux]  [k] entry_SYSENTER_compat
     1.90%  hackbench  [vdso]            [.] __vdso_gettimeofday
     1.80%  hackbench  [kernel.vmlinux]  [k] _raw_spin_lock
     1.80%  hackbench  [kernel.vmlinux]  [k] skb_set_owner_w
     1.67%  hackbench  [kernel.vmlinux]  [k] kmem_cache_free
     1.52%  hackbench  [kernel.vmlinux]  [k] skb_release_data
     1.48%  hackbench  [kernel.vmlinux]  [k] common_file_perm
     1.45%  hackbench  [kernel.vmlinux]  [k] page_fault
     1.45%  hackbench  [kernel.vmlinux]  [k] cmpxchg_double_slab.isra.62
     1.42%  hackbench  [kernel.vmlinux]  [k] new_sync_read
     1.36%  hackbench  [kernel.vmlinux]  [k] __check_heap_object

Here's the hardware details:

# ========
# captured on: Wed Jun 14 07:34:42 2017
# hostname : triton
# os release : 4.10.0-23-generic
# perf version : 4.12.rc5.g9688eb
# arch : x86_64
# nrcpus online : 12
# nrcpus avail : 12
# cpudesc : Intel(R) Core(TM) i7-4960X CPU @ 3.60GHz
# cpuid : GenuineIntel,6,62,4
# total memory : 65917012 kB
# cmdline : /home/mingo/bin/perf record /home/mingo/hackbench 10 
# event : name = cycles:ppp, , size = 112, { sample_period, sample_freq } = 1, sample_type = IP|TID|TIME, disabled = 1, inherit = 1, mmap = 1, comm = 1, enable_on_exec = 1, task = 1,
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# pmu mappings: intel_bts = 6, uncore_cbox_5 = 21, uncore_ha_0 = 8, uncore_imc_2 = 9, uncore_cbox_3 = 19, cstate_pkg = 25, breakpoint = 5, uncore_imc_0 = 11, uncore_ubox = 15, uncore
# HEADER_CACHE info available, use -I to display
# missing features: HEADER_TRACING_DATA HEADER_BRANCH_STACK HEADER_GROUP_DESC HEADER_AUXTRACE HEADER_STAT 
# ========

let me know if you need more info.

Btw., note that there's also this warning:

  unwind: target platform=x86 is not supported

(but that's unrelated to this commit.)

Thanks,

	Ingo

  reply	other threads:[~2017-06-14  5:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 23:23 [GIT PULL 0/2] perf/urgent fixes for 4.12 Arnaldo Carvalho de Melo
2017-06-13 23:23 ` [PATCH 1/2] perf evsel: Fix probing of precise_ip level for default cycles event Arnaldo Carvalho de Melo
2017-06-14  5:45   ` Ingo Molnar [this message]
2017-06-14 10:44     ` Arnaldo Carvalho de Melo
2017-06-14 10:51       ` Ingo Molnar
2017-06-14 10:57         ` Arnaldo Carvalho de Melo
2017-06-14 13:55           ` Ingo Molnar
2017-06-14 14:44             ` Arnaldo Carvalho de Melo
2017-06-14 13:29     ` Arnaldo Carvalho de Melo
2017-06-14 13:52       ` perf: unwind: target platform=x86 not supported was: " Arnaldo Carvalho de Melo
2017-06-14 14:19         ` Jiri Olsa
2017-06-14 14:31           ` Jiri Olsa
2017-06-14 14:47           ` Arnaldo Carvalho de Melo
2017-06-14 14:06       ` Ingo Molnar
2017-06-14 14:46         ` Arnaldo Carvalho de Melo
2017-06-14 19:12         ` Arnaldo Carvalho de Melo
2017-06-13 23:23 ` [PATCH 2/2] perf tools: Fix build with ARCH=x86_64 Arnaldo Carvalho de Melo
2017-06-14  5:33 ` [GIT PULL 0/2] perf/urgent fixes for 4.12 Ingo Molnar

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=20170614054500.exocsybw2qkug5tn@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.com \
    /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