linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Al Grant <al.grant@foss.arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
	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>,
	linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH] perf inject corrupts file by deleting event
Date: Tue, 15 Dec 2020 10:33:07 -0300	[thread overview]
Message-ID: <20201215133307.GB252952@kernel.org> (raw)
In-Reply-To: <5d085d2a-7f76-88ab-25c4-1370f7e1589e@foss.arm.com>

Em Tue, Dec 15, 2020 at 09:48:32AM +0000, Al Grant escreveu:
> On 16/11/2020 16:59, Arnaldo Carvalho de Melo wrote:
> > Em Mon, Nov 16, 2020 at 01:48:39PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Mon, Nov 16, 2020 at 01:45:33PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > Em Tue, Nov 17, 2020 at 01:25:09AM +0900, Namhyung Kim escreveu:
> > > > > On Sat, Nov 14, 2020 at 5:38 AM Al Grant <al.grant@foss.arm.com> wrote:
> > > > > > Mismatching sample_types are seen with "perf record -e cs_etm//",
> > > > > > where the AUX event has TID|TIME|CPU|IDENTIFIER and the dummy
> > > > > > event has TID|TIME|IDENTIFIER. Perhaps they could be the same,
> > > > > > but it isn't normally a problem if they aren't - perf has
> > > > > > no problems reading the file. The sample_types have to agree on
> > > > > > the position of IDENTIFIER, because that's how perf finds the
> > > > > > right event descriptor in the first place, but they don't normally
> > > > > > have to agree on other fields, and perf doesn't check that they do.
> > > > > > The problem is specific to the way "perf inject" reorganizes the
> > > > > > events and the way synthetic MMAP events are recorded with a zero
> > > > > > identifier. A simple solution is to stop "perf inject" deleting
> > > > > > the tracing event.
> > > 
> > > > > > Signed-off-by: Al Grant <al.grant@arm.com>
> > > > > > Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> > > 
> > > > > While I'm ok with this change,
> > > > 
> > > > So, to make progress, I'll take your phrase as an Acked-by, as described
> > > > in Documentation/process/submitting-patches.rst, ok?
> > > 
> > > But I'll have to apply by hand:
> > > 
> > > [acme@five perf]$ am /wb/1.patch
> > > warning: Patch sent with format=flowed; space at the end of lines might be lost.
> > > Applying: perf inject corrupts file by deleting event
> > > error: patch failed: tools/perf/builtin-inject.c:791
> > > error: tools/perf/builtin-inject.c: patch does not apply
> > > Patch failed at 0001 perf inject corrupts file by deleting event
> > > hint: Use 'git am --show-current-patch=diff' to see the failed patch
> > > When you have resolved this problem, run "git am --continue".
> > > If you prefer to skip this patch, run "git am --skip" instead.
> > > To restore the original branch and stop patching, run "git am --abort".
> > > [acme@five perf]$
> > 
> > And you also forgot to update the comment and to remove the now unused
> > 'evsel' variable, find the updated patch below, please check.
> 
> Thanks for tidying it up, it looks good to me. Do you need me to resubmit
> or can you take it as it is now with your changes?
> 
> Al


Its already in v5.10:

[acme@five perf]$ git log --oneline -1 1c756cd429d8f3da33d31f2a970284b9d5260534
1c756cd429d8f3da perf inject: Fix file corruption due to event deletion
[acme@five perf]$ git tag --contains 1c756cd429d8f3da33d31f2a970284b9d5260534 | grep ^v
v5.10
v5.10-rc5
v5.10-rc6
v5.10-rc7
[acme@five perf]$

Thanks for checking,

- Arnaldo

      reply	other threads:[~2020-12-15 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <83633eb2-04dc-4a13-3ad7-abd3a7459ac1@foss.arm.com>
2020-11-13 20:38 ` [PATCH] perf inject corrupts file by deleting event Al Grant
2020-11-16 16:25   ` Namhyung Kim
2020-11-16 16:45     ` Arnaldo Carvalho de Melo
2020-11-16 16:48       ` Arnaldo Carvalho de Melo
2020-11-16 16:59         ` Arnaldo Carvalho de Melo
2020-12-15  9:48           ` Al Grant
2020-12-15 13:33             ` Arnaldo Carvalho de Melo [this message]

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=20201215133307.GB252952@kernel.org \
    --to=acme@kernel.org \
    --cc=al.grant@foss.arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).