From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>,
Jiri Olsa <jolsa@redhat.com>,
namhyung@kernel.org, kan.liang@linux.intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf report: Fix -F for branch & mem modes
Date: Thu, 4 Mar 2021 14:05:54 -0300 [thread overview]
Message-ID: <YEETcjPREqLp0mWZ@kernel.org> (raw)
In-Reply-To: <B8831E43-992C-44BC-9CF7-BABAE8C0F5BB@linux.vnet.ibm.com>
Em Thu, Mar 04, 2021 at 12:15:58PM +0530, Athira Rajeev escreveu:
> > On 04-Mar-2021, at 11:59 AM, Ravi Bangoria <ravi.bangoria@linux.ibm.com> wrote:
> >
> > perf report fails to add valid additional fields with -F when
> > used with branch or mem modes. Fix it.
> >
> > Before patch:
> >
> > $ ./perf record -b
> > $ ./perf report -b -F +srcline_from --stdio
> > Error:
> > Invalid --fields key: `srcline_from'
> >
> > After patch:
> >
> > $ ./perf report -b -F +srcline_from --stdio
> > # Samples: 8K of event 'cycles'
> > # Event count (approx.): 8784
> > ...
> >
> > Reported-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
> > Fixes: aa6b3c99236b ("perf report: Make -F more strict like -s")
> > Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
>
> Thanks for the fix Ravi.
>
> Reviewed-and-tested-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Thanks, applied.
- Arnaldo
> > ---
> > tools/perf/util/sort.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
> > index 0d5ad42812b9..552b590485bf 100644
> > --- a/tools/perf/util/sort.c
> > +++ b/tools/perf/util/sort.c
> > @@ -3140,7 +3140,7 @@ int output_field_add(struct perf_hpp_list *list, char *tok)
> > if (strncasecmp(tok, sd->name, strlen(tok)))
> > continue;
> >
> > - if (sort__mode != SORT_MODE__MEMORY)
> > + if (sort__mode != SORT_MODE__BRANCH)
> > return -EINVAL;
> >
> > return __sort_dimension__add_output(list, sd);
> > @@ -3152,7 +3152,7 @@ int output_field_add(struct perf_hpp_list *list, char *tok)
> > if (strncasecmp(tok, sd->name, strlen(tok)))
> > continue;
> >
> > - if (sort__mode != SORT_MODE__BRANCH)
> > + if (sort__mode != SORT_MODE__MEMORY)
> > return -EINVAL;
> >
> > return __sort_dimension__add_output(list, sd);
> > --
> > 2.29.2
> >
>
--
- Arnaldo
prev parent reply other threads:[~2021-03-04 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 6:29 [PATCH] perf report: Fix -F for branch & mem modes Ravi Bangoria
2021-03-04 6:45 ` Athira Rajeev
2021-03-04 17:05 ` 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=YEETcjPREqLp0mWZ@kernel.org \
--to=acme@kernel.org \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=ravi.bangoria@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.