lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ppqex8tj.fsf@sejong.aot.lge.com>
Date:	Wed, 06 Nov 2013 16:56:08 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Pekka Enberg <penberg@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	Jiri Olsa <jolsa@...hat.com>,
	Rodrigo Campos <rodrigo@...g.com.ar>,
	Arun Sharma <asharma@...com>
Subject: Re: [RFC/PATCHSET 00/14] perf report: Add support to accumulate hist periods (v2)

Hi Ingo,

On Tue, 5 Nov 2013 12:58:02 +0100, Ingo Molnar wrote:
> * Namhyung Kim <namhyung@...nel.org> wrote:
>> But the 'cumulative' (btw, I feel a bit hard to type this word..) is 
>> different in that it *generates* entries didn't get sampled originally. 
>> And as it requires callchains, total field will not work if callchains 
>> are missing.
>
> Well, 'total' should disappear if it's not available.

But what if it's the only sort key user gave?

>
> We already have some 'column elimination/optimization' logic - like the 
> 'dso' will disappear already if it's a single dso everywhere, IIRC?

When user explicitly gives a single name as the column filter with -c,
-d and/or -S options.

But it seems to have a same issue that I said above:

  $ perf report -s comm -c perf --stdio
  (...)
  # Overhead
  # ........
  #
     100.00%


And TUI even shows a noise in the output.

>
>> But as Frederic noted, it might affect the performance of perf report, 
>> so it might be better to delay this behavior to make default after users 
>> feel comfortable with an option?
>
> I think with call-chain speedups it should be fast enough, right?

Yeah, it should speedup things significantly.

>
> We can argue about the default separately - if it's all done correctly 
> then it should be really easy to change the default layout of 'perf 
> report'.
>

I just think that the perf tools are going so fast. ;-)


>> For now, there're two kind of columns:
>> 
>> - one for showing entry's overhead percentage: self, sys, user,
>>   guest_sys and guest_user.  So the 'total' should go into this
>>   category.  I named it hpp (hist_entry period percentage) functions and
>>   yes, I know it's an awfully bad name. :)  Please see perf_hpp__format.
>> 
>>   There're controlled by a couple of options:  --show-total-period,
>>   --show-nr-samples and --showcpuutilization (I hate this!).  And event
>>   group also can affect its output.
>> 
>> - one for grouping entries: cpu, pid, comm, dso, symbol, srcline and
>>   parent.  We call it "sort keys" but confusingly it doesn't affect 
>>   output sorting for now.
>
> Well, it's still a sort key in a sense, a string lexicographical ordering 
> in essence, right?

Right.  But it only affects on groupping entries when added and
collapsed not the output ordering.

>
>> > If there's demand then we could decouple sort keys from the display 
>> > order, by slightly augmenting the field format:
>> >
>> >  -F total,self:2,process:0,dso:1,name
>> >
>> > This would sort by 'process' field as the primary key, 'dso' the secondary 
>> > key and 'self' as the tertiary key.
>> >
>> > And we could also keep the -s/--sort option:
>> >
>> >  -s process,dso,self
>> >
>> > So the above -F line would be equivalent to:
>> >
>> >  -F total,self,process,dso,name -s process,dso,self
>> >
>> > What do you think?
>> 
>> I like the second one.  It can sustain the old way but can support the 
>> new way easily.
>>
>> But for compatibility we need to use 'self' sort key internally iff 
>> neither the -F option nor the config option was given by user.  And it 
>> might warn (or notice) users to add 'self' column in the sort key for 
>> future use.
>
> Mind explaining what the problem here is? I don't think I get it.

Well, normal users still use it as they used to - like 
'perf report -s comm,dso' without -F option and the config.

In that case, what would the output look like?  According to the above
proposal it'd look like below.

  # Command  Shared object
  # .......  .............
        aaa  aaa
        aaa  libc.so
        bbb  bbb
        bbb  libc.so


But the user might want see this:

  # Overhead (self)  Command  Shared object
  # ...............  .......  .............
             30.00%      bbb  bbb
             25.00%      aaa  aaa
             25.00%      aaa  libc.so
             20.00%      bbb  libc.so


If she really wants to see it sorted by comm and dso, the command line
should be 'perf report -F self,comm,dso -s comm,dso'
(or just 'perf report -F self -s comm,dso' could do the same).

  # Overhead (self)  Command  Shared object
  # ...............  .......  .............
             25.00%      aaa  aaa
             25.00%      aaa  libc.so
             30.00%      bbb  bbb
             20.00%      bbb  libc.so


Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ