[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191112141801.GA10207@kernel.org>
Date: Tue, 12 Nov 2019 11:18:01 -0300
From: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
jolsa@...hat.com, kan.liang@...el.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf report: Fix segfault with '-F phys_daddr'
Em Tue, Nov 12, 2019 at 07:28:06PM +0530, Ravi Bangoria escreveu:
>
>
> On 11/12/19 4:34 PM, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Nov 12, 2019 at 11:19:46AM +0530, Ravi Bangoria escreveu:
> > > If perf.data file is not recorded with mem-info, adding 'phys_daddr'
> > > to output field in perf report results in segfault. Fix that.
> > >
> > > Before:
> > > $ ./perf record ls
> > > $ ./perf report -F +phys_daddr
> > > Segmentation fault (core dumped)
> > >
> > > After:
> > > $ ./perf report -F +phys_daddr
> > > Samples: 11 of event 'cycles:u', Event count (approx.): 1485821
> > > Overhead Data Physical Address Command Shared Object Symbol
> > > 22.57% [.] 0000000000000000 ls libc-2.29.so [.] __strcoll_l
> > > 21.87% [.] 0000000000000000 ls ld-2.29.so [.] _dl_relocate_object
> > > ...
> >
> > Shouldn't we instead just bail out and state that this isn't possible
> > and leave the user wondering why what was asked isn't presented?
>
> You mean popup with something like "phys_daddr is not available in perf.data"
> and also don't show that column in perf report?
Just bail out completely, something like:
$ ./perf report -F +phys_daddr
"phys_daddr" is not available in perf.data, use 'record -e some,thing' to have it.
- Arnaldo
Powered by blists - more mailing lists