From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Dave Martin <Dave.Martin@arm.com>
Cc: Andre Przywara <Andre.Przywara@arm.com>,
"leo.yan@linaro.org" <leo.yan@linaro.org>,
James Clark <James.Clark@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <Mark.Rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Al Grant <Al.Grant@arm.com>, Wei Li <liwei391@huawei.com>,
John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 06/22] perf arm-spe: Refactor printing string to buffer
Date: Wed, 11 Nov 2020 15:02:48 -0300 [thread overview]
Message-ID: <20201111180248.GE380127@kernel.org> (raw)
In-Reply-To: <20201111180127.GD380127@kernel.org>
Em Wed, Nov 11, 2020 at 03:01:27PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Nov 11, 2020 at 05:58:27PM +0000, Dave Martin escreveu:
> >
> > On Wed, Nov 11, 2020 at 05:39:22PM +0000, Arnaldo Carvalho de Melo wrote:
> > > Em Wed, Nov 11, 2020 at 03:45:23PM +0000, Andr� Przywara escreveu:
> > > > On 11/11/2020 15:35, Arnaldo Carvalho de Melo wrote:
> > > > > Isn't this 'ret +=' ? Otherwise if any of these arm_spe_pkt_snprintf()
> > > > > calls are made the previous 'ret' value is simply discarded. Can you
> > > > > clarify this?
>
> > > > ret is the same as err. If err is negative (from previous calls), we
> > > > return that straight away, so it does nothing but propagating the error.
>
> > > Usually the return of a snprintf is used to account for buffer space, ok
> > > I'll have to read it, which I shouldn't as snprintf has a well defined
> > > meaning...
>
> > > Ok, now that I look at it, I realize it is not a snprintf() routine, but
> > > something with different semantics, that will look at a pointer to an
> > > integer and then do nothing if it comes with some error, etc, confusing
> > > :-/
>
> > Would you be happier if the function were renamed?
>
> > Originally we were aiming for snprintf() semantics, but this still
> > spawns a lot of boilerplate code and encourages mistakes in the local
> > caller here -- hence the current sticky error approach.
>
> > So maybe the name should now be less "snprintf"-like.
>
> Please, its important to stick to semantics for such well known type of
> routines, helps reviewing, etc.
>
> I'll keep the series up to that point and will run my build tests, then
> push it publicly to acme/perf/core and you can go from there, ok?
>
> I've changed the BIT() to BIT_ULL() as Andre suggested and I'm testing
> it again.
To make it clear, this is what I have locally:
0a04244cabc5560c (HEAD -> perf/core) perf arm-spe: Fix packet length handling
b65577baf4829092 perf arm-spe: Refactor arm_spe_get_events()
b2ded2e2e2764e50 perf arm-spe: Refactor payload size calculation
903b659436b70692 perf arm-spe: Fix a typo in comment
c185f1cde46653cd perf arm-spe: Include bitops.h for BIT() macro
40714c58630aaaf1 perf mem: Support ARM SPE events
c825f7885178f994 perf c2c: Support AUX trace
13e5df1e3f1ba1a9 perf mem: Support AUX trace
014a771c7867fda5 perf auxtrace: Add itrace option '-M' for memory events
436cce00710a3f23 perf mem: Only initialize memory event for recording
8b8173b45a7a9709 perf c2c: Support memory event PERF_MEM_EVENTS__LOAD_STORE
4ba2452cd88f39da perf mem: Support new memory event PERF_MEM_EVENTS__LOAD_STORE
eaf6aaeec5fa301c perf mem: Introduce weak function perf_mem_events__ptr()
f9f16dfbe76e63ba perf mem: Search event name with more flexible path
644bf4b0f7acde64 (tag: perf-tools-tests-v5.11-2020-11-04, acme/perf/core) perf jevents: Add test for arch std events
The perf-tools-tests-v5.11-2020-11-04, is in git.kernel.org, as it was
tested, etc, test results are in that signed tag, as usual for some
months.
- Arnaldo
next prev parent reply other threads:[~2020-11-11 18:02 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 7:11 [PATCH v8 00/22] perf arm-spe: Refactor decoding & dumping flow Leo Yan
2020-11-11 7:11 ` [PATCH v8 01/22] perf arm-spe: Include bitops.h for BIT() macro Leo Yan
2020-11-11 7:11 ` [PATCH v8 02/22] perf arm-spe: Fix a typo in comment Leo Yan
2020-11-11 7:11 ` [PATCH v8 03/22] perf arm-spe: Refactor payload size calculation Leo Yan
2020-11-11 7:11 ` [PATCH v8 04/22] perf arm-spe: Refactor arm_spe_get_events() Leo Yan
2020-11-11 7:11 ` [PATCH v8 05/22] perf arm-spe: Fix packet length handling Leo Yan
2020-11-11 7:11 ` [PATCH v8 06/22] perf arm-spe: Refactor printing string to buffer Leo Yan
2020-11-11 15:35 ` Arnaldo Carvalho de Melo
2020-11-11 15:45 ` André Przywara
2020-11-11 17:39 ` Arnaldo Carvalho de Melo
2020-11-11 17:58 ` Dave Martin
2020-11-11 18:01 ` Arnaldo Carvalho de Melo
2020-11-11 18:02 ` Arnaldo Carvalho de Melo [this message]
2020-11-11 18:08 ` Arnaldo Carvalho de Melo
2020-11-12 2:20 ` Leo Yan
2020-11-11 23:03 ` David Laight
2020-11-12 3:02 ` Leo Yan
2020-11-11 15:53 ` Dave Martin
2020-11-11 15:58 ` Dave Martin
2020-11-11 17:40 ` Arnaldo Carvalho de Melo
2020-11-11 7:11 ` [PATCH v8 07/22] perf arm-spe: Consolidate arm_spe_pkt_desc()'s return value Leo Yan
2020-11-11 16:04 ` Dave Martin
2020-11-11 7:11 ` [PATCH v8 08/22] perf arm-spe: Refactor packet header parsing Leo Yan
2020-11-11 7:11 ` [PATCH v8 09/22] perf arm-spe: Add new function arm_spe_pkt_desc_addr() Leo Yan
2020-11-11 7:11 ` [PATCH v8 10/22] perf arm-spe: Refactor address packet handling Leo Yan
2020-11-11 7:11 ` [PATCH v8 11/22] perf arm_spe: Fixup top byte for data virtual address Leo Yan
2020-11-11 7:11 ` [PATCH v8 12/22] perf arm-spe: Refactor context packet handling Leo Yan
2020-11-11 7:11 ` [PATCH v8 13/22] perf arm-spe: Add new function arm_spe_pkt_desc_counter() Leo Yan
2020-11-11 7:11 ` [PATCH v8 14/22] perf arm-spe: Refactor counter packet handling Leo Yan
2020-11-11 7:11 ` [PATCH v8 15/22] perf arm-spe: Add new function arm_spe_pkt_desc_event() Leo Yan
2020-11-11 7:11 ` [PATCH v8 16/22] perf arm-spe: Refactor event type handling Leo Yan
2020-11-11 7:11 ` [PATCH v8 17/22] perf arm-spe: Remove size condition checking for events Leo Yan
2020-11-11 7:11 ` [PATCH v8 18/22] perf arm-spe: Add new function arm_spe_pkt_desc_op_type() Leo Yan
2020-11-11 7:11 ` [PATCH v8 19/22] perf arm-spe: Refactor operation packet handling Leo Yan
2020-11-11 7:11 ` [PATCH v8 20/22] perf arm-spe: Add more sub classes for operation packet Leo Yan
2020-11-11 7:11 ` [PATCH v8 21/22] perf arm_spe: Decode memory tagging properties Leo Yan
2020-11-11 7:11 ` [PATCH v8 22/22] perf arm-spe: Add support for ARMv8.3-SPE Leo Yan
2020-11-11 10:13 ` [PATCH v8 00/22] perf arm-spe: Refactor decoding & dumping flow André Przywara
2020-11-11 11:58 ` Arnaldo Carvalho de Melo
2020-11-11 16:10 ` Arnaldo Carvalho de Melo
2020-11-11 16:15 ` Arnaldo Carvalho de Melo
2020-11-11 16:20 ` André Przywara
2020-11-11 17:44 ` Arnaldo Carvalho de Melo
2020-11-11 17:51 ` André Przywara
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=20201111180248.GE380127@kernel.org \
--to=acme@kernel.org \
--cc=Al.Grant@arm.com \
--cc=Andre.Przywara@arm.com \
--cc=Dave.Martin@arm.com \
--cc=James.Clark@arm.com \
--cc=Mark.Rutland@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=john.garry@huawei.com \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/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