Re: Issue of metrics for multiple uncore PMUs (was Re: [RFC PATCH v2 23/23] perf metricgroup: remove duped metric group events)

2020-10-02 Thread Ian Rogers
On Fri, Oct 2, 2020 at 5:00 AM John Garry wrote: > > On 07/05/2020 15:08, Ian Rogers wrote: > > Hi Ian, > > I was wondering if you ever tested commit 2440689d62e9 ("perf > metricgroup: Remove duped metric group events") for when we have a > metric which alia

Re: [PATCHv2 1/9] perf tools: Add build id shell test

2020-10-02 Thread Ian Rogers
$(QUIET_LINK)echo 'int main(void) { return 0; }' | $(CC) > > -Wl,--build-id=sha1 -o $@ -x c - > > +$(OUTPUT)buildid-ex-md5: > > + $(QUIET_LINK)echo 'int main(void) { return 0; }' | $(CC) > > -Wl,--build-id=md5 -o $@ -x c - > > +endif > > Can we just build t

Re: [PATCH] selftests/ftrace: check for do_sys_openat2 in user-memory test

2020-10-02 Thread Colin Ian King
On 02/10/2020 14:07, Masami Hiramatsu wrote: > On Thu, 1 Oct 2020 09:56:41 +0100 > Colin King wrote: > >> From: Colin Ian King >> >> More recent libc implementations are now using openat/openat2 system >> calls so also add do_sys_openat2 to the t

Re: [PATCH 1/9] perf tools: Add build id shell test

2020-10-01 Thread Ian Rogers
On Thu, Oct 1, 2020 at 3:25 AM Jiri Olsa wrote: > > On Thu, Oct 01, 2020 at 11:25:34AM +0200, Jiri Olsa wrote: > > On Wed, Sep 30, 2020 at 07:00:05PM -0700, Ian Rogers wrote: > > > On Wed, Sep 30, 2020 at 10:15 AM Jiri Olsa wrote: > > > > > > > > Ad

Re: [PATCH] selftests/ftrace: check for do_sys_openat2 in user-memory test

2020-10-01 Thread Colin Ian King
On 01/10/2020 15:44, Steven Rostedt wrote: > On Thu, 1 Oct 2020 09:56:41 +0100 > Colin King wrote: > >> From: Colin Ian King >> >> More recent libc implementations are now using openat/openat2 system >> calls so also add do_sys_openat2 to the tracing so that th

Re: [PATCH 9/9] perf tools: Align buildid list output for short build ids

2020-09-30 Thread Ian Rogers
.../tools/perf/buildid-ex-md5 > 1805c738c8f3ec0f47b7ea09080c28f34d18a82b /usr/lib64/ld-2.31.so > > Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/util/dso.c | 2 +- > tools/perf/util/dso.h | 1 - > tools/perf/util/dsos.c | 6 -- >

Re: [PATCH 8/9] perf tools: Add size to struct perf_record_header_build_id

2020-09-30 Thread Ian Rogers
have correct > build id data and will be usable for debuginfod processing > if needed (coming in following patches). > > Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Thanks, Ian > --- > tools/lib/perf/include/perf/event.h | 12 +++- > tools/perf/util/build-id.c

Re: [PATCH 7/9] perf tools: Pass build_id object to dso__build_id_equal

2020-09-30 Thread Ian Rogers
On Wed, Sep 30, 2020 at 10:15 AM Jiri Olsa wrote: > > Passing build_id object to dso__build_id_equal, so we can > properly check build id with different size than sha1. > > Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/util/dso.c|

Re: [PATCH 6/9] perf tools: Pass build_id object to dso__set_build_id

2020-09-30 Thread Ian Rogers
On Wed, Sep 30, 2020 at 10:15 AM Jiri Olsa wrote: > > Passing build_id object to dso__set_build_id, so it's easier > to initialize dos's build id object. > > Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/util/dso.c| 4 ++-- >

Re: [PATCH 5/9] perf tools: Pass build_id object to build_id__sprintf

2020-09-30 Thread Ian Rogers
d85ebfff7 > > instead of: > a50e350e97c43b4708d09bcd85ebfff7 > > Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/builtin-buildid-cache.c| 6 ++-- > tools/perf/tests/sdt.c| 2 +- > tools/perf/util/ann

Re: [PATCH 4/9] perf tools: Pass build id object to sysfs__read_build_id

2020-09-30 Thread Ian Rogers
On Wed, Sep 30, 2020 at 10:15 AM Jiri Olsa wrote: > > Passing build id object to sysfs__read_build_id function, > so it can populate the size of the build_id object. > > Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/util/build-id.c

Re: [PATCH 3/9] perf tools: Pass build_id object to filename__read_build_id

2020-09-30 Thread Ian Rogers
On Wed, Sep 30, 2020 at 10:15 AM Jiri Olsa wrote: > > Passing build_id object to filename__read_build_id function, > so it can populate the size of the build_id object. > > Changing filename__read_build_id code for both elf/non-elf > code. > > Signed-off-by: Jiri Ols

Re: [PATCH 2/9] perf tools: Use build_id object in dso

2020-09-30 Thread Ian Rogers
is is preparatory change for following patches, > and there's no functional change. > > Signed-off-by: Jiri Olsa Acked-by: Ian Rogers This reads a little funny but makes sense in the context of the rest of the patch set. Thanks, Ian > --- > tools/perf/builtin-buildid-cache.c

Re: [PATCH 1/9] perf tools: Add build id shell test

2020-09-30 Thread Ian Rogers
On Wed, Sep 30, 2020 at 10:15 AM Jiri Olsa wrote: > > Adding test for build id cache that adds binary > with sha1 and md5 build ids and verifies it's > added properly. > > The test updates build id cache with perf record > and perf buildid-cache -a. > > Signed-off-by

re: net/mlx5: Refactor tc flow attributes structure

2020-09-28 Thread Colin Ian King
Hi, static analysis with Coverity has found a null pointer dereference issue with the following commit: commit c620b772152b8274031083bdb2e11c963e596c5c Author: Ariel Levkovich Date: Thu Apr 30 05:54:08 2020 +0300 net/mlx5: Refactor tc flow attributes structure The analysis is as

Re: [PATCH v2 1/2] perf vendor events: Update CascadelakeX events to v1.08

2020-09-25 Thread Ian Rogers
ould generate the changes. I believe Kajol Jain has some unmerged changes because there's a worry about the interaction with the scripts and assumptions in jevents. Having access to the scripts would mean that we could fix whatever issues there would be. Thanks, Ian

[PATCH] perf parse-events: Reduce casts around bp_addr

2020-09-24 Thread Ian Rogers
...@kernel.org/ Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/parse-events.h | 2 +- tools/perf/util/parse-events.y | 8 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c

Re: [PATCH] perf test: Fix msan uninitialized use.

2020-09-24 Thread Ian Rogers
On Wed, Sep 23, 2020 at 4:37 PM Nick Desaulniers wrote: > > On Wed, Sep 23, 2020 at 2:07 PM 'Ian Rogers' via Clang Built Linux > wrote: > > > > Ensure 'st' is initialized before an error branch is taken. > > Fixes test "67: Parse and process metrics"

Re: [PATCH 5/5] perf test: Add expand cgroup event test

2020-09-23 Thread Ian Rogers
t; + > + rblist__init(_events); > + ret = test_expand_events(evlist, _events); > + evlist__delete(evlist); > + return ret; > +} > + > +static int expand_group_events(void) > +{ > + int ret; > + struct evlist *evlist; > +

Re: [PATCH 6/7] perf bench: Run inject-build-id with --buildid-all option too

2020-09-23 Thread Ian Rogers
ild-id injection took: 18.441 msec (+- 0.106 msec) > Average time per event: 1.808 usec (+- 0.010 usec) > Average build-id-all injection took: 13.451 msec (+- 0.132 msec) > Average time per event: 1.319 usec (+- 0.013 usec) > > Signed-off-by: Namhyung Kim Acked-by: Ian Roger

Re: [PATCH 5/7] perf inject: Add --buildid-all option

2020-09-23 Thread Ian Rogers
e --buildid-all option too. > > Original-patch-by: Stephane Eranian > Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Thanks, Ian > --- > tools/perf/Documentation/perf-inject.txt | 6 +- > tools/perf/builtin-inject.c | 112 ++- > 2

Re: [PATCH 1/7] perf bench: Add build-id injection benchmark

2020-09-23 Thread Ian Rogers
On Wed, Sep 23, 2020 at 1:05 AM Namhyung Kim wrote: > > Sometimes I can see perf record piped with perf inject take long time > processing build-id. So add inject-build-id benchmark to the > internals benchmark suite to measure its overhead regularly. > > It runs perf inject command internally

[PATCH] perf test: Fix msan uninitialized use.

2020-09-23 Thread Ian Rogers
perf.c:539:3 Fixes: commit f5a56570a3f2 ("perf test: Fix memory leaks in parse-metric test") Signed-off-by: Ian Rogers --- tools/perf/tests/parse-metric.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.

Re: [PATCH v2 1/2] perf vendor events: Update CascadelakeX events to v1.08

2020-09-23 Thread Ian Rogers
atch on latest perf/core, it seemed OK. > > # git log --oneline > 4cbdb1c21926 (HEAD -> perf/core) perf vendor events: Update CascadelakeX > events to v1.08 > b1f815c479c1 (tag: perf-tools-tests-v5.10-2020-09-10, origin/perf/core) perf > vendor events power9: > Add hv_24

Re: [PATCH v4] perf metricgroup: Fix uncore metric expressions

2020-09-23 Thread Ian Rogers
On Thu, Sep 17, 2020 at 6:47 PM Namhyung Kim wrote: > > Hi Arnaldo, > > On Fri, Sep 18, 2020 at 5:39 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Thu, Sep 17, 2020 at 01:18:07PM -0700, Ian Rogers escreveu: > > > A metric like DRAM_BW_Use has on SkylakeX eve

Re: [PATCH 3/3] perf list: Add 'pfm' to list libpfm4 events

2020-09-22 Thread Ian Rogers
> - "perf list [] > [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|event_glob]", > + "perf list [] > [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|pfm|event_glob]", Should this be "#ifdef HAVE_LIBPFM" to avoid advertis

RE: [EXTERNAL] Re: [PATCH v2 00/28] Add support for Clang LTO

2020-09-22 Thread Ian Bearman
for the MSVC code generation team as well as the (interim) team for the Linux tools team that i built and lead last year. He has inherited the various efforts my team was working on and is the right contact going forward to collaborate on Linux compiler and tools efforts. ian Bearman Principal Software

Re: [PATCH v2] PCI: brcmstb: fix a missing if statement on a return error check

2020-09-22 Thread Colin Ian King
On 22/09/2020 13:43, Jim Quinlan wrote: > On Tue, Sep 22, 2020 at 7:49 AM Markus Elfring wrote: >> >>> The error return ret is not being check with an if statement and >> >> Wording alternative: >> The return value from a call of the function “brcm_phy_start” was not >> checked and >> >> >>> V2:

Re: [PATCH 1/3] stress-shm-sysv: exercise shmat with invalid flags

2020-09-22 Thread Colin Ian King
I believe these patches should have gone directly to me and not various other folk. Colin On 22/09/2020 08:27, Piyush Goyal wrote: > Exercise shmat syscall with invalid flags resulting in more kernel > coverage. > > Signed-off-by: Piyush Goyal > --- > stress-shm-sysv.c | 14 ++ >

Re: [PATCH][next] PCI: brcmstb: fix a missing if statement on a return error check

2020-09-21 Thread Colin Ian King
} > > Currently, our STB upstream suspend/resume is not functional yet and > this is how this omission slipped by testing. > > Thanks, > Jim Quinlan > Broadcom STB > > On Mon, Sep 21, 2020 at 3:43 PM Florian Fainelli wrote: >> >> On 9/21/20 7:40 AM, Colin

Re: [PATCH] scsi: arcmsr: Remove the superfluous break

2020-09-18 Thread Colin Ian King
On 18/09/2020 19:00, Dan Carpenter wrote: > Smatch just ignores these because they're often done deliberately. > > regards, > dan carpenter > And I ignore fixing them when coverity reports them because life is too short. Colin

Re: [PATCH][next] drm/panel: fix null pointer dereference on pointer mode

2020-09-18 Thread Colin Ian King
On 18/09/2020 17:22, Guido Günther wrote: > Hi, > On Fri, Sep 18, 2020 at 04:51:36PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently a null pointer check on pointer mode is passing mode to >> function drm_mode_vrefresh and this causes a null pointe

Re: [PATCH v3] perf metricgroup: Fix uncore metric expressions

2020-09-17 Thread Ian Rogers
Should be ok. I cherry-picked the patch on to a local checkout of perf/urgent and sent as an in-reply-to here: https://lore.kernel.org/lkml/20200917190026.gb1426...@kernel.org/T/#m6c12d6a224540ed5f222e58fff9807f1cdc4238f Thanks, Ian On Thu, Sep 17, 2020 at 12:00 PM Arnaldo Carvalho de Melo

[PATCH v4] perf metricgroup: Fix uncore metric expressions

2020-09-17 Thread Ian Rogers
uot;). Fixes: ded80bda8bc9 ("perf expr: Migrate expr ids table to a hashmap"). Reported-by: Jin Yao Signed-off-by: Ian Rogers --- tools/perf/util/metricgroup.c | 75 ++- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/tools/perf/util/metricgr

Re: [PATCH 05/11] perf parse-event: Fix memory leak in evsel->unit

2020-09-16 Thread Ian Rogers
On Wed, Sep 16, 2020 at 12:12 AM Namhyung Kim wrote: > > Hello Ian and David, > > Thank you for the good suggestions! > > On Wed, Sep 16, 2020 at 4:56 AM David Malcolm wrote: > > Some ideas (with the caveat that I'm a GCC developer, and not a regular > > on LKML):

Re: [PATCH 16/26] perf tools: Synthesize modules with mmap3

2020-09-15 Thread Ian Rogers
; > > + event->mmap3.pid = machine->pid; > > + > > + memcpy(event->mmap3.filename, pos->dso->long_name, > > pos->dso->long_name_len + 1); > > + > >

Re: [PATCH 05/11] perf parse-event: Fix memory leak in evsel->unit

2020-09-15 Thread Ian Rogers
ry allocation is a request to own the memory. There was a talk about GCC's -fanalyzer option doing malloc/free checking at Linux plumbers 2 weeks ago: https://linuxplumbersconf.org/event/7/contributions/721/attachments/542/961/2020-LPC-analyzer-talk.pdf I added David Malcolm, the LPC presenter,

Re: [PATCH] media: rc: fix check on dev->min_timeout for LIRC_GET_MIN_TIMEOUT ioctl

2020-09-15 Thread Colin Ian King
On 15/09/2020 18:12, Sean Young wrote: > On Tue, Sep 15, 2020 at 04:36:08PM +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently the LIRC_GET_MIN_TIMEOUT is checking for a null dev->max_timeout >> and then accessing dev->min_timeout, hence we may

Re: [PATCHSET v2 00/11] perf tools: Fix various memory leaks

2020-09-14 Thread Ian Rogers
-config,percore,aux-output,aux-sample-size' The 01.org version of this from: https://download.01.org/perfmon/TMA_Metrics.xlsx is: UNC_ARB_TRK_OCCUPANCY.DATA_READ / UNC_ARB_TRK_OCCUPANCY.DATA_READ:c1 It seems that :c1 has been translated into thresh=1 but that thresh doesn't exist as a format option (just "cmask

Re: [PATCH 02/26] perf: Introduce mmap3 version of mmap event

2020-09-14 Thread Ian Rogers
uld avoid > a lot of that penalty, by avoiding having to parse the perf.data file > and leveraging the fact that the buildid may be in memory already. > Although my concern on > this has to do with large pages and the impact they have on alignment > of sections in memory. I think Ian

Re: [PATCH v3 3/4] perf record: Don't clear event's period if set by a term

2020-09-14 Thread Ian Rogers
On Mon, Sep 14, 2020 at 2:51 PM Arnaldo Carvalho de Melo wrote: > > Em Mon, Sep 14, 2020 at 06:46:55PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, Sep 11, 2020 at 07:56:54PM -0700, Ian Rogers escreveu: > > > If events in a group explicitly set a frequency

Re: [PATCH 02/26] perf: Introduce mmap3 version of mmap event

2020-09-14 Thread Ian Rogers
ere are some workarounds like commit c8f6ae1fb28d (perf inject jit: Remove //anon mmap events). Perhaps these events can switch to reporting the length the mmap requested rather than the length of the vma? I could imagine that changes here could be interesting to folks doing CHERI or hypervisors, for example, they may want more address bits. BPF has stack traces with elements of buildid + offset. Using these in perf samples would avoid the need for mmap events, synthesis, etc. but at the cost of larger and possibly slower stack traces. Perhaps we should just remove the idea of mmap events altogether? Thanks, Ian

[PATCH] perf bench: Fix 2 memory sanitizer warnings

2020-09-11 Thread Ian Rogers
Memory sanitizer warns if a write is performed where the memory being read for the write is uninitialized. Avoid this warning by initializing the memory. Signed-off-by: Ian Rogers --- tools/perf/bench/sched-messaging.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v2 2/5] perf record: Prevent override of attr->sample_period for libpfm4 events

2020-09-11 Thread Ian Rogers
On Fri, Sep 11, 2020 at 3:34 PM Ian Rogers wrote: > > On Fri, Sep 4, 2020 at 11:51 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Fri, Sep 04, 2020 at 03:50:13PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Fri, Sep 04, 2020 at 03:48:03PM -0300, Arnaldo Ca

[PATCH v3 2/4] perf record: Prevent override of attr->sample_period for libpfm4 events

2020-09-11 Thread Ian Rogers
the problem by preventing override for events with attr->sample_period != 0 by the time perf_evsel__config() is invoked. This seems to have been the intent of the author. Signed-off-by: Stephane Eranian Reviewed-by: Ian Rogers Signed-off-by: Ian Rogers --- tools/perf/util/evsel.c | 3 +-- 1 file chan

[PATCH v3 3/4] perf record: Don't clear event's period if set by a term

2020-09-11 Thread Ian Rogers
pling configuration") Signed-off-by: Ian Rogers --- tools/perf/util/record.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c index a4cc11592f6b..ea9aa1d7cf50 100644 --- a/tools/perf/util/reco

[PATCH v3 4/4] perf test: Leader sampling shouldn't clear sample period

2020-09-11 Thread Ian Rogers
Add test that a sibling with leader sampling doesn't have its period cleared. Signed-off-by: Ian Rogers --- tools/perf/tests/attr/README | 1 + tools/perf/tests/attr/test-record-group2 | 29 2 files changed, 30 insertions(+) create mode 100644 tools/perf

[PATCH v3 1/4] perf record: Set PERF_RECORD_PERIOD if attr->freq is set.

2020-09-11 Thread Ian Rogers
igned-off-by: David Sharp Signed-off-by: Ian Rogers --- tools/perf/util/evsel.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index fd865002cbbd..3e985016da7e 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/uti

[PATCH v3 0/4] Fixes for setting event freq/periods

2020-09-11 Thread Ian Rogers
. David Sharp (1): perf record: Set PERF_RECORD_PERIOD if attr->freq is set. Ian Rogers (2): perf record: Don't clear event's period if set by a term perf test: Leader sampling shouldn't clear sample period Stephane Eranian (1): perf record: Prevent override of attr->sample_

Re: [PATCH v2 2/5] perf record: Prevent override of attr->sample_period for libpfm4 events

2020-09-11 Thread Ian Rogers
On Fri, Sep 4, 2020 at 11:51 AM Arnaldo Carvalho de Melo wrote: > > Em Fri, Sep 04, 2020 at 03:50:13PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, Sep 04, 2020 at 03:48:03PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Fri, Sep 04, 2020 at 09:22:10AM -0700

re: xfs: support inode btree blockcounts in online repair

2020-09-11 Thread Colin Ian King
Hi, Static analysis with Coverity has detected an issue with the following commit: commit 30deae31eab501f568aadea45cfb3258b9e522f5 Author: Darrick J. Wong Date: Wed Aug 26 10:48:50 2020 -0700 xfs: support inode btree blockcounts in online repair the analysis is as follows: 830

Re: [PATCH -rc v1] gcov: Disable gcov build with GCC 10

2020-09-10 Thread Colin Ian King
t; As a workaround, let's disable GCOV build for broken GCC 10 version. >> >> [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1891288 >> [2] https://lore.kernel.org/lkml/20200827133932.3338519-1-l...@kernel.org >> Cc: Colin Ian King >> Signed-off-by: Leon Romano

Re: [PATCH v2 3/3] perf metricgroup: Fix uncore metric expressions

2020-09-10 Thread Ian Rogers
On Wed, Sep 9, 2020 at 10:51 PM Namhyung Kim wrote: > > On Thu, Sep 10, 2020 at 12:26 PM Ian Rogers wrote: > > > > A metric like DRAM_BW_Use has on SkylakeX events uncore_imc/cas_count_read/ > > and uncore_imc/case_count_write/. These events open 6 events per s

[PATCH v3] perf metricgroup: Fix uncore metric expressions

2020-09-10 Thread Ian Rogers
2e9 ("perf metricgroup: Remove duped metric group events"). Fixes: ded80bda8bc9 ("perf expr: Migrate expr ids table to a hashmap"). Reported-by: Jin Yao Signed-off-by: Ian Rogers --- tools/perf/util/metricgroup.c | 75 ++- 1 file change

Re: [PATCHSET 0/4] perf stat: Add --multiply-cgroup option

2020-09-10 Thread Ian Rogers
ant not to get too distracted by desires for better syntax, as this change makes a benefit in a way that works with the existing flags. If it is accepted, the man pages need to be updated. Thanks, Ian

Re: [PATCH 2/3] perf metricgroup: Fix uncore metric expressions

2020-09-09 Thread Ian Rogers
On Wed, Sep 9, 2020 at 10:52 AM Ian Rogers wrote: > > On Wed, Sep 9, 2020 at 2:53 AM Namhyung Kim wrote: > > > > Hi Ian, > > > > On Wed, Sep 9, 2020 at 5:02 PM Ian Rogers wrote: > > > > > > A metric like DRAM_BW_Use has on SkylakeX events >

[PATCH v2 2/3] perf metricgroup: Fix typo in comment.

2020-09-09 Thread Ian Rogers
Add missing character. Signed-off-by: Ian Rogers --- tools/perf/util/metricgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index 8831b964288f..662f4e8777d5 100644 --- a/tools/perf/util/metricgroup.c +++ b

[PATCH v2 3/3] perf metricgroup: Fix uncore metric expressions

2020-09-09 Thread Ian Rogers
der computation that was broken in the same commits. Erroneous duplication introduced in: commit 2440689d62e9 ("perf metricgroup: Remove duped metric group events"). Fixes: ded80bda8bc9 ("perf expr: Migrate expr ids table to a hashmap"). Reported-by: Jin Yao Signed-off-by: Ian

[PATCH v2 1/3] perf stat: Remove dead code

2020-09-09 Thread Ian Rogers
No need to set os.evsel twice. Signed-off-by: Ian Rogers --- tools/perf/util/stat-display.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 493ec372fdec..4b57c0c07632 100644 --- a/tools/perf/util/stat-display.c +++ b/tools

Re: [PATCH 2/3] perf metricgroup: Fix uncore metric expressions

2020-09-09 Thread Ian Rogers
On Wed, Sep 9, 2020 at 2:53 AM Namhyung Kim wrote: > > Hi Ian, > > On Wed, Sep 9, 2020 at 5:02 PM Ian Rogers wrote: > > > > A metric like DRAM_BW_Use has on SkylakeX events uncore_imc/cas_count_read/ > > and uncore_imc/case_count_write/. These events open 6 events

Re: [PATCH 2/3] perf metricgroup: Fix uncore metric expressions

2020-09-09 Thread Ian Rogers
On Wed, Sep 9, 2020 at 1:33 AM Jin, Yao wrote: > > > > On 9/9/2020 4:02 PM, Ian Rogers wrote: > > A metric like DRAM_BW_Use has on SkylakeX events uncore_imc/cas_count_read/ > > and uncore_imc/case_count_write/. These events open 6 events per socket > > wit

[PATCH 3/3] perf metricgroup: Fix typo in comment.

2020-09-09 Thread Ian Rogers
Add missing character. Signed-off-by: Ian Rogers --- tools/perf/util/metricgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index d216a161f41c..050f3404c137 100644 --- a/tools/perf/util/metricgroup.c +++ b

[PATCH 2/3] perf metricgroup: Fix uncore metric expressions

2020-09-09 Thread Ian Rogers
uot;). Fixes: ded80bda8bc9 ("perf expr: Migrate expr ids table to a hashmap"). Reported-by: Jin, Yao Signed-off-by: Ian Rogers --- tools/perf/util/metricgroup.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tools/perf/util/metricgroup.c b/tools/perf/u

[PATCH 1/3] perf stat: Remove dead code

2020-09-09 Thread Ian Rogers
No need to set os.evsel twice. Signed-off-by: Ian Rogers --- tools/perf/util/stat-display.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c index 493ec372fdec..4b57c0c07632 100644 --- a/tools/perf/util/stat-display.c +++ b/tools

[tip: x86/cleanups] x86/resctrl: Fix spelling in user-visible warning messages

2020-09-04 Thread tip-bot2 for Colin Ian King
The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 93921baa3f6ff77e57d7e772165aa7bd709b5387 Gitweb: https://git.kernel.org/tip/93921baa3f6ff77e57d7e772165aa7bd709b5387 Author:Colin Ian King AuthorDate:Mon, 10 Aug 2020 08:55:08 +01:00

Re: [PATCH v2 2/5] perf record: Prevent override of attr->sample_period for libpfm4 events

2020-09-04 Thread Ian Rogers
On Fri, Sep 4, 2020 at 9:03 AM Jiri Olsa wrote: > > On Thu, Sep 03, 2020 at 10:41:14PM -0700, Ian Rogers wrote: > > On Wed, Jul 29, 2020 at 4:24 PM Ian Rogers wrote: > > > > > > On Tue, Jul 28, 2020 at 9:10 AM Jiri Olsa wrote: > > > > > > > &g

{PATCH 0/2] HID: wiimote: Minor change to spinlock usage

2020-09-04 Thread Ian Abbott
[I have posted these patches previously, but that was over a year ago. --IA] A couple of minor changes to the wiimote core module. They do not change functionality of the driver: 1) HID: wiimote: make handlers[] const 2) HID: wiimote: narrow spinlock range in wiimote_hid_event()

[PATCH 2/2] HID: wiimote: narrow spinlock range in wiimote_hid_event()

2020-09-04 Thread Ian Abbott
In `wiimote_hid_event()`, the `wdata->state.lock` spinlock does not need to be held while searching `handlers[]` for a suitable handler function. Change it so the spinlock is only held during the call to the handler function itself. Signed-off-by: Ian Abbott --- drivers/hid/hid-wiimote-cor

[PATCH 1/2] HID: wiimote: make handlers[] const

2020-09-04 Thread Ian Abbott
The `handlers[]` array contents are never modified, so use the `const` qualifier. Signed-off-by: Ian Abbott --- drivers/hid/hid-wiimote-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index

Re: [PATCH v2] perf expr: Force encapsulation on expr_id_data

2020-09-03 Thread Ian Rogers
On Thu, Aug 27, 2020 at 12:00 AM kajoljain wrote: > > > > On 8/26/20 9:27 PM, Jiri Olsa wrote: > > On Wed, Aug 26, 2020 at 08:30:55AM -0700, Ian Rogers wrote: > >> This patch resolves some undefined behavior where variables in > >> expr_id_data were accessed (

Re: [PATCH v2 5/9] libperf: Add support for user space counter access

2020-09-03 Thread Ian Rogers
On Wed, Sep 2, 2020 at 12:48 PM Rob Herring wrote: > > On Wed, Sep 2, 2020 at 12:07 PM Ian Rogers wrote: > > > > On Fri, Aug 28, 2020 at 1:56 PM Rob Herring wrote: > > > > > > x86 and arm64 can both support direct access of event counters in > > >

Re: [PATCH 3/4] perf vendor events amd: Add recommended events

2020-09-03 Thread Ian Rogers
On Thu, Sep 3, 2020 at 11:27 AM Kim Phillips wrote: > > On 9/3/20 1:19 AM, Ian Rogers wrote: > > On Tue, Sep 1, 2020 at 3:10 PM Kim Phillips wrote: > >> The nps1_die_to_dram event may need perf stat's --metric-no-group > >> switch if the number of available data fab

Re: [PATCH v2 4/5] perf record: Don't clear event's period if set by a term

2020-09-03 Thread Ian Rogers
On Tue, Aug 4, 2020 at 8:50 AM Ian Rogers wrote: > > On Tue, Aug 4, 2020 at 7:49 AM Adrian Hunter wrote: > > > > On 4/08/20 4:33 pm, Ian Rogers wrote: > > > On Tue, Aug 4, 2020 at 3:08 AM Adrian Hunter > > > wrote: > > >> > > >&g

Re: [PATCH v2 2/5] perf record: Prevent override of attr->sample_period for libpfm4 events

2020-09-03 Thread Ian Rogers
On Wed, Jul 29, 2020 at 4:24 PM Ian Rogers wrote: > > On Tue, Jul 28, 2020 at 9:10 AM Jiri Olsa wrote: > > > > On Tue, Jul 28, 2020 at 05:59:46PM +0200, Jiri Olsa wrote: > > > On Tue, Jul 28, 2020 at 01:57:31AM -0700, Ian Rogers wrote: > > > > From: S

Re: [PATCH v2 1/5] perf record: Set PERF_RECORD_PERIOD if attr->freq is set.

2020-09-03 Thread Ian Rogers
On Wed, Jul 29, 2020 at 2:43 PM Ian Rogers wrote: > > On Wed, Jul 29, 2020 at 11:52 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Tue, Jul 28, 2020 at 01:57:30AM -0700, Ian Rogers escreveu: > > > From: David Sharp > > > > > > evsel__config()

Re: [PATCH] perf parse-events: Use uintptr_t when casting numbers to pointers

2020-09-03 Thread Ian Rogers
On Thu, Sep 3, 2020 at 11:44 AM Arnaldo Carvalho de Melo wrote: > > Hi Ian, > > Please check that this is ok with you, > > Thanks, > > - Arnaldo Thanks Arnaldo, this looks good to me! There is a separate issue, the casts are necessary as we have PE_VALUEs that ar

Re: [PATCH] perf metric: Fix some memory leaks

2020-09-03 Thread Ian Rogers
On Thu, Sep 3, 2020 at 8:21 PM Namhyung Kim wrote: > > I found some memory leaks while reading the metric code. Some are > real and others only occur in the error path. Thanks Namhyung! Is it possible to get test coverage? Ian > Cc: Kajol Jain > Cc: John Garry > Cc: I

Re: [PATCH] perf jevents: Fix suspicious code in fixregex()

2020-09-03 Thread Ian Rogers
On Thu, Sep 3, 2020 at 8:25 AM Namhyung Kim wrote: > > The new string should have enough space for the original string and > the back slashes IMHO. > > Cc: John Garry > Cc: Kajol Jain > Cc: Ian Rogers > Signed-off-by: Namhyung Kim Reviewed-by: Ian Rogers Definitely

Re: [PATCH 4/4] perf vendor events amd: Enable Family 19h users by matching Zen2 events

2020-09-03 Thread Ian Rogers
On Tue, Sep 1, 2020 at 3:10 PM Kim Phillips wrote: > > This enables zen3 users by reusing mostly-compatible zen2 events > until the official public list of zen3 events is published in a > future PPR. > > Signed-off-by: Kim Phillips Acked-by: Ian Rogers Thanks! Ian > Cc:

Re: [PATCH 3/4] perf vendor events amd: Add recommended events

2020-09-03 Thread Ian Rogers
t; Cc: Alexander Shishkin > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: Vijay Thakkar > Cc: Andi Kleen > Cc: John Garry > Cc: Kan Liang > Cc: Yunfeng Ye > Cc: Jin Yao > Cc: "Martin Liška" > Cc: Borislav Petkov > Cc: Jon Grimm > Cc: Martin Jambor

Re: [PATCH 2/4] perf vendor events amd: Add ITLB Instruction Fetch Hits event for zen1

2020-09-03 Thread Ian Rogers
Performance counter stats for 'sleep 1': > > 0 cpu/event=0x94/u >190,744 cpu/event=0x94,umask=0xff/u > > Signed-off-by: Kim Phillips Acked-by: Ian Rogers Thanks, Ian > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Arnaldo Carvalho de Melo

Re: [PATCH 1/4] perf vendor events amd: Add L2 Prefetch events for zen1

2020-09-02 Thread Ian Rogers
R) for AMD Family 17h Model 01h, Revision > B1 Processors Rev 1.14 - April 15, 2017 > > But e.g., are included in this 2019 version of the PPR: > > Processor Programming Reference (PPR) for AMD Family 17h Model 18h, Revision > B1 Processors Rev. 3.14 - Sep 26, 2019 > > Signed-o

Re: [PATCH] RDMA/ucma: fix memory leak of mc on an xa_alloc failure

2020-09-02 Thread Colin Ian King
On 02/09/2020 20:03, Markus Elfring wrote: >> Currently when an xa_alloc failure occurs the error exit path leaks >> the allocated object mc. Fix this by adding an error return path >> that frees mc and rename error exit paths err3 to err4 and err2 to err3. > > I propose to choose further

Re: [PATCH v2 5/9] libperf: Add support for user space counter access

2020-09-02 Thread Ian Rogers
6 width = READ_ONCE(pc->pmc_width); > + > + evcnt <<= 64 - width; > + evcnt >>= 64 - width; > + cnt += evcnt; > + } else > + return -1; > + > +

Re: [PATCH v2] power: supply: charger-manager: Fix info message in check_charging_duration()

2020-09-02 Thread Colin Ian King
On 02/09/2020 17:43, Gustavo A. R. Silva wrote: > On Wed, Sep 02, 2020 at 09:29:31AM -0700, Randy Dunlap wrote: >> On 9/2/20 9:23 AM, Gustavo A. R. Silva wrote: >>> A few months ago, commit e132fc6bb89b ("power: supply: charger-manager: >>> Make decisions focussed on battery status") >>> changed

Re: [PATCH -next] perf bench: fix return value check in do_run_multi_threaded()

2020-09-02 Thread Ian Rogers
lti-threaded synthesize benchmark") > Signed-off-by: YueHaibing Acked-by: Ian Rogers Thanks! Ian > --- > tools/perf/bench/synthesize.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/bench/synthesize.c b/tools/perf/bench/synthesi

Re: [PATCH] ACPI: sysfs: copy ACPI data using io memory copying

2020-09-02 Thread Colin Ian King
On 02/09/2020 12:13, David Laight wrote: > From: Colin Ian King >> Sent: 02 September 2020 11:27 >> >> On 14/03/2020 10:23, Rafael J. Wysocki wrote: >>> On Thursday, March 12, 2020 12:13:45 PM CET Colin King wrote: >>>> From: Colin Ian King >>>

Re: [PATCH] ACPI: sysfs: copy ACPI data using io memory copying

2020-09-02 Thread Colin Ian King
On 14/03/2020 10:23, Rafael J. Wysocki wrote: > On Thursday, March 12, 2020 12:13:45 PM CET Colin King wrote: >> From: Colin Ian King >> >> Reading ACPI data on ARM64 at a non-aligned offset from >> /sys/firmware/acpi/tables/data/BERT will cause a splat because >&

Re: [RFC PATCH -rc] gcov: Protect from uninitialized number of functions provided by GCC

2020-08-29 Thread Colin Ian King
63): [] > _raw_spin_unlock_irqrestore+0x8e/0xb0 > hardirqs last disabled at (326464): [] > _raw_spin_lock_irqsave+0x34/0xa0 > hardirqs last disabled at (326464): [] > _raw_spin_lock_irqsave+0x34/0xa0 > softirqs last enabled at (320794): [] > __do_softirq+0x931/0xbc4 > softir

Re: [PATCH] perf stat: update POWER9 metrics to utilize other metrics

2020-08-26 Thread Ian Rogers
On Wed, Aug 26, 2020 at 7:06 PM Paul A. Clarke wrote: > > On Wed, Aug 26, 2020 at 09:26:40AM -0700, Ian Rogers wrote: > > On Fri, Aug 14, 2020 at 5:43 AM Arnaldo Carvalho de Melo > > wrote: > > > Em Fri, Aug 14, 2020 at 11:20:42AM +0530, kajoljain escreveu: > > &

Re: [PATCH] perf stat: update POWER9 metrics to utilize other metrics

2020-08-26 Thread Ian Rogers
On Fri, Aug 14, 2020 at 5:43 AM Arnaldo Carvalho de Melo wrote: > > Em Fri, Aug 14, 2020 at 11:20:42AM +0530, kajoljain escreveu: > > > > > > On 8/14/20 9:13 AM, Ian Rogers wrote: > > > On Thu, Aug 13, 2020 at 3:21 PM Paul A. Clarke wrote: > > >> &

Re: [PATCH 1/2] perf expr: Force encapsulation on expr_id_data

2020-08-26 Thread Ian Rogers
On Wed, Aug 26, 2020 at 4:34 AM Jiri Olsa wrote: > > On Tue, Aug 25, 2020 at 09:29:09PM -0700, Ian Rogers wrote: > > This patch resolves some undefined behavior where variables in > > expr_id_data were accessed (for debugging) without being defined. To > > better enforce t

[PATCH v2] perf expr: Force encapsulation on expr_id_data

2020-08-26 Thread Ian Rogers
This patch resolves some undefined behavior where variables in expr_id_data were accessed (for debugging) without being defined. To better enforce the tagged union behavior, the struct is moved into expr.c and accessors provided. Tag values (kinds) are explicitly identified. Signed-off-by: Ian

[PATCH 2/2] perf parse-events: Avoid an uninitialized read.

2020-08-25 Thread Ian Rogers
With a fake_pmu the pmu_info isn't populated by perf_pmu__check_alias. In this case, don't try to copy the uninitialized values to the evsel. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff

[PATCH 1/2] perf expr: Force encapsulation on expr_id_data

2020-08-25 Thread Ian Rogers
This patch resolves some undefined behavior where variables in expr_id_data were accessed (for debugging) without being defined. To better enforce the tagged union behavior, the struct is moved into expr.c and accessors provided. Tag values (kinds) are explicitly identified. Signed-off-by: Ian

Re: [PATCH] perf test: Perf test 67 dumps core on s390

2020-08-25 Thread Ian Rogers
The marco map_for_each_event() loops over that > array tests for members metric_expr/metric_name/metric_group > being non-NULL. Adding this element fixes the issue. > > Output after: > [root@t35lp46 perf]# ./perf test

Re: [PATCH] drivers: staging: comedi: fixed duplicate words from checkpatch

2020-08-24 Thread Ian Abbott
* multiple reads on the status register to achieve this). */ while (--loops) { status = inb(dev->iobase + DAQP_STATUS_REG); -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 0

Re: [PATCH] Harden autofs ioctl table

2020-08-19 Thread Ian Kent
; > Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Ian Kent Thanks Matthew, I certainly want to know about changes to autofs made by others so thanks for sending this to me. At the same time I need to send my patches via someone else as Linus asked me to do ages ago now. So, once again Andrew,

re: ath11k: initialize wmi config based on hw_params

2020-08-19 Thread Colin Ian King
Hi, static analysis with Coverity has detected a duplicated assignment issue with the following commit: commit 2d4bcbed5b7d53e19fc158885e7340b464b64507 Author: Carl Huang Date: Mon Aug 17 13:31:51 2020 +0300 ath11k: initialize wmi config based on hw_params The analysis is as follows:

out of bounds access on array error_text[] because of -ETIMEDOUT return from __send_command()

2020-08-18 Thread Colin Ian King
Hi, static analysis with coverity has found a buffer overflow issue with the brcmstb driver, I believe it may have been introduced with the following commit: commit a7c25759d8d84b64c437a78f05df7314b02934e5 Author: Markus Mayer Date: Tue Apr 2 16:01:00 2019 -0700 memory: brcmstb: dpfe:

<    1   2   3   4   5   6   7   8   9   10   >