Hi David,

On Fri, 25 Oct 2013 12:19:07 -0600, David Ahern wrote:
> On 10/25/13 12:12 PM, Frederic Weisbecker wrote:
>> Oh I see. It's possible that my massive conversion to use the comm
>> accessor got blind at some point and left over a few things. I
>> remember that I only lightly tested that new comm infrastructure. I
>> mean I tested a lot of "perf report -s foo,bar" combinations for
>> performance comparisons but I haven't tested the perf script and all
>> the other perf tools.
>>
>> I'll rebase these patches and test that wider before resending.
>
> specifically, I see stuff like perf forking ls and comm still shows as
> perf even though there is COMM record with the rename to ls. I believe
> the test case was something like:
>
> perf sched record -- ls
> perf script

Hmm.. did you try my latest v5 patchset?  I couldn't reproduce the case
at least for the command lines above.

  $ perf script
            perf 24810 [007] 1546517.815809: sched:sched_stat_runtime: 
comm=perf pid=24810 ru
            perf 24810 [007] 1546517.815909: sched:sched_wakeup: comm=perf 
pid=24811 prio=120
         swapper     0 [008] 1546517.815913: sched:sched_switch: 
prev_comm=swapper/8 prev_pid
            perf 24810 [007] 1546517.815953: sched:sched_stat_runtime: 
comm=perf pid=24810 ru
            perf 24810 [007] 1546517.815957: sched:sched_switch: prev_comm=perf 
prev_pid=2481
            perf 24811 [008] 1546517.815992: sched:sched_wakeup: 
comm=migration/8 pid=48 prio
            perf 24811 [008] 1546517.815993: sched:sched_stat_runtime: 
comm=perf pid=24811 ru
            perf 24811 [008] 1546517.815993: sched:sched_switch: prev_comm=perf 
prev_pid=2481
     migration/8    48 [008] 1546517.815996: sched:sched_migrate_task: 
comm=perf pid=24811 pr
     migration/8    48 [008] 1546517.816000: sched:sched_switch: 
prev_comm=migration/8 prev_p
         swapper     0 [009] 1546517.816002: sched:sched_switch: 
prev_comm=swapper/9 prev_pid
              ls 24811 [009] 1546517.816808: sched:sched_stat_runtime: comm=ls 
pid=24811 runt


Here, the process 24811 has only 3 samples before COMM event

  $ perf report -D | grep 24811 | grep -v MMAP | head
  0 0 0x629b0 [0x38]: PERF_RECORD_COMM: perf:24811
  8 1546517815992058 0x65f50 [0x68]: PERF_RECORD_SAMPLE(IP, 1): 24811/24811: 
0xffffffff81091512 period: 1 addr: 0
   ... thread: perf:24811
  8 1546517815993189 0x65fb8 [0x70]: PERF_RECORD_SAMPLE(IP, 1): 24811/24811: 
0xffffffff81099d25 period: 83314 addr: 0
   ... thread: perf:24811
  8 1546517815993975 0x66028 [0x80]: PERF_RECORD_SAMPLE(IP, 1): 24811/24811: 
0xffffffff81659d60 period: 1 addr: 0
   ... thread: perf:24811
  9 1546517816224342 0x66378 [0x38]: PERF_RECORD_COMM: ls:24811
  9 1546517816808637 0x667f0 [0x70]: PERF_RECORD_SAMPLE(IP, 1): 24811/24811: 
0xffffffff81099d25 period: 810663 addr: 0
   ... thread: ls:24811

  $ perf version
  perf version 3.11.ge9eb20


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

Reply via email to