From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752073Ab3J1Fif (ORCPT ); Mon, 28 Oct 2013 01:38:35 -0400 Received: from lgeamrelo01.lge.com ([156.147.1.125]:43398 "EHLO LGEAMRELO01.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381Ab3J1Fid (ORCPT ); Mon, 28 Oct 2013 01:38:33 -0400 X-AuditID: 9c93017d-b7c97ae000000e9f-4a-526df858fc82 From: Namhyung Kim To: David Ahern Cc: Frederic Weisbecker , Arnaldo Carvalho de Melo , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Namhyung Kim , LKML , Linus Torvalds , Jiri Olsa , Ingo Molnar , Stephane Eranian Subject: Re: [PATCH 6/8] perf tools: Add new comm infrastructure References: <1381468543-25334-1-git-send-email-namhyung@kernel.org> <1381468543-25334-7-git-send-email-namhyung@kernel.org> <20131025130417.GB20423@ghostprotocols.net> <526A8F54.2040601@gmail.com> <526AB61B.80505@gmail.com> Date: Mon, 28 Oct 2013 14:38:31 +0900 In-Reply-To: <526AB61B.80505@gmail.com> (David Ahern's message of "Fri, 25 Oct 2013 12:19:07 -0600") Message-ID: <871u369cq0.fsf@sejong.aot.lge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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