public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v5] perf stat: Fix wrong skipping for per-die aggregation
Date: Thu, 14 Jan 2021 09:10:09 +0800	[thread overview]
Message-ID: <2c8ea7a0-6d02-bea2-3a73-bafa481d99e9@linux.intel.com> (raw)
In-Reply-To: <20210113110701.GC1331835@krava>



On 1/13/2021 7:07 PM, Jiri Olsa wrote:
> On Wed, Jan 13, 2021 at 09:56:31AM +0800, Jin Yao wrote:
> 
> SNIP
> 
>>
>> root@lkp-csl-2ap4 ~# ./perf stat -a -I 1000 -e llc_misses.mem_read --per-die -- sleep 5
>>       1.001586691 S0-D0           1            1229440 Bytes llc_misses.mem_read
>>       1.001586691 S0-D1           1             976832 Bytes llc_misses.mem_read
>>       1.001586691 S1-D0           1             938304 Bytes llc_misses.mem_read
>>       1.001586691 S1-D1           1            1227328 Bytes llc_misses.mem_read
>>       2.003776312 S0-D0           1            1586752 Bytes llc_misses.mem_read
>>       2.003776312 S0-D1           1             875392 Bytes llc_misses.mem_read
>>       2.003776312 S1-D0           1             855616 Bytes llc_misses.mem_read
>>       2.003776312 S1-D1           1             949376 Bytes llc_misses.mem_read
>>       3.006512788 S0-D0           1            1338880 Bytes llc_misses.mem_read
>>       3.006512788 S0-D1           1             920064 Bytes llc_misses.mem_read
>>       3.006512788 S1-D0           1             877184 Bytes llc_misses.mem_read
>>       3.006512788 S1-D1           1            1020736 Bytes llc_misses.mem_read
>>       4.008895291 S0-D0           1             926592 Bytes llc_misses.mem_read
>>       4.008895291 S0-D1           1             906368 Bytes llc_misses.mem_read
>>       4.008895291 S1-D0           1             892224 Bytes llc_misses.mem_read
>>       4.008895291 S1-D1           1             987712 Bytes llc_misses.mem_read
>>       5.001590993 S0-D0           1             962624 Bytes llc_misses.mem_read
>>       5.001590993 S0-D1           1             912512 Bytes llc_misses.mem_read
>>       5.001590993 S1-D0           1             891200 Bytes llc_misses.mem_read
>>       5.001590993 S1-D1           1             978432 Bytes llc_misses.mem_read
>>
>> On no-die system, die_id is 0, actually it's hashmap(socket,0), original behavior
>> is not changed.
>>
>> Reported-by: Huang Ying <ying.huang@intel.com>
>> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
>> ---
>> v5:
>>   Hash key is changed to die_id << 32 | socket.
>>   In pkg_id_hash, return (int64_t)key & 0xffffffff; actually it's socket.
> 
> seems ok, but I'm getting python test fail:
> 
> 	$ sudo ./perf test python -v
> 	19: 'import perf' in python                                         :
> 	--- start ---
> 	test child forked, pid 1352066
> 	python usage test: "echo "import sys ; sys.path.append('python'); import perf" | '/usr/bin/python2' "
> 	Traceback (most recent call last):
> 	  File "<stdin>", line 1, in <module>
> 	ImportError: python/perf.so: undefined symbol: hashmap__free
> 	test child finished with -1
> 	---- end ----
> 	'import perf' in python: FAILED!
> 
> jirka
> 

Seems I need to add hashmap.c to python-ext-sources. It surprised me that it was not in it yet. :(

diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index a9d9c142eb7c..266874913dbb 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -35,3 +35,4 @@ util/symbol_fprintf.c
  util/units.c
  util/affinity.c
  util/rwsem.c
+util/hashmap.c

root@kbl-ppc:~# ./perf test 19
19: 'import perf' in python                                         : Ok

Thanks
Jin Yao

  reply	other threads:[~2021-01-14  1:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  1:56 [PATCH v5] perf stat: Fix wrong skipping for per-die aggregation Jin Yao
2021-01-13 11:07 ` Jiri Olsa
2021-01-14  1:10   ` Jin, Yao [this message]
2021-01-14 18:30   ` Arnaldo Carvalho de Melo
2021-01-14 19:00     ` Jiri Olsa

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=2c8ea7a0-6d02-bea2-3a73-bafa481d99e9@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.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