Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp67077imm; Wed, 5 Sep 2018 15:06:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYji7XcHPiDEwacyr/zkP5JgwkkDu0+68g3LLeutvo2MQIyybHXs8dxoooTPxNuoRFojXk2 X-Received: by 2002:a63:7b4b:: with SMTP id k11-v6mr39546703pgn.64.1536185217812; Wed, 05 Sep 2018 15:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536185217; cv=none; d=google.com; s=arc-20160816; b=OJMUsNngsobeRHmkvECbVvIkS0lCzq+OeIwD19aSiiU3dYLr70nshvgnDkDatQpYor sjR7EmlrTCKQ7VPlvMDVhfbgC3eF1rkhrnB6CQ9wOOuXiyqGhFMxXmeeyia/6meaG18u 6NMwzvcTq2+GW0TEptxrw2gFob3MKI9lpANyb02Qlkk5o0a7rtBpupFtcA3ijFumT6VS gTkBJAvJFhRdP7UvQJl+d5zvRPq8TUJiHjsXapBw6H6cOIUdwr3qBZ+vco4bK+49ZwC+ pfbsTrGDX2qXVa9TU9Cve8/bMDntPUIzLxaT3hM//lfGNGSWlxJshyD82OyfHpqyR6Sq dNIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=1hJnmcP7NBqhvFc7HX5DeYA70HZB05RwJEDeWhKxsX8=; b=hRhPMEAtw2FmCudKZp+2atf5u4s2VQoZUyc/giXbalJ5ALNzgeAV6pa7fUwil5p34f twa15kkdQBpGoNVVMIdg+dyQfjNaPH3a1TCuDxhfX1PmC5WWElQfvCakDrlLQotaGW+q 20IAtfJbFhEi09QDKxdWYk1oGtOab7T5GRUpxTlXRTskY2zRejuOjbxwUkE7fCP8MhE7 tO90wPufZ1Va1/4b2xcFOI2g/Y6Aa3cmt1RH7lTYV8TtdbpxmqKNbQi/Th6CziPXvupG 1m3VWV8QIOkCnkUkWAK2kXDrmmsvTgTaR8xZc8g5oe8Xvoqcb0K4Gnq8e/c0RAX2YzCY oGHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MOp0ast1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si3084660pln.232.2018.09.05.15.06.42; Wed, 05 Sep 2018 15:06:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MOp0ast1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727997AbeIFChS (ORCPT + 99 others); Wed, 5 Sep 2018 22:37:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:51278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbeIFChR (ORCPT ); Wed, 5 Sep 2018 22:37:17 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5F7E82083D; Wed, 5 Sep 2018 22:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536185106; bh=BeklGlUxecL8vM/mmOFme74Dze9Ydnr1A8gIJvEI5dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MOp0ast15L5E/HrcvY+JDIjHC508W+ae9vY0h96oArbTrPZqdFgX5Xdm4H3+hNG0R mJGnLacfcbRQHhludgdJBELNeJNtmTCbHk/BTIRJdmI/CI1JeVLTNMHi9epKVjrBF9 vXsLEbix/paNLZWRl6j7vQVk95E9zhfEgCVcKLY0= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Jiri Olsa , Namhyung Kim , Wang Nan Subject: [PATCH 05/77] perf trace: Show comm/tid for augmented_syscalls Date: Wed, 5 Sep 2018 19:03:28 -0300 Message-Id: <20180905220440.20256-6-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180905220440.20256-1-acme@kernel.org> References: <20180905220440.20256-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo To get us a bit more like the sys_enter + sys_exit combo: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): openat(dfd: CWD, filename: 0x31b6dda8, flags: CLOEXEC) 0.009 ( 0.009 ms): cat/3619 openat(dfd: CWD, filename: 0x31b6dda8, flags: CLOEXEC) = 3 0.051 ( ): openat(dfd: CWD, filename: 0x31d75ce0, flags: CLOEXEC) 0.054 ( 0.010 ms): cat/3619 openat(dfd: CWD, filename: 0x31d75ce0, flags: CLOEXEC) = 3 0.539 ( ): openat(dfd: CWD, filename: 0xca71506b) 0.543 ( 0.115 ms): cat/3619 openat(dfd: CWD, filename: 0xca71506b) = 3 # After: # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c,openat cat /etc/passwd > /dev/null 0.000 ( ): cat/4919 openat(dfd: CWD, filename: 0xc8358da8, flags: CLOEXEC) 0.007 ( 0.005 ms): cat/4919 openat(dfd: CWD, filename: 0xc8358da8, flags: CLOEXEC) = 3 0.032 ( ): cat/4919 openat(dfd: CWD, filename: 0xc8560ce0, flags: CLOEXEC) 0.033 ( 0.006 ms): cat/4919 openat(dfd: CWD, filename: 0xc8560ce0, flags: CLOEXEC) = 3 0.301 ( ): cat/4919 openat(dfd: CWD, filename: 0x91fa306b) 0.304 ( 0.004 ms): cat/4919 openat(dfd: CWD, filename: 0x91fa306b) = 3 # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-6w8ytyo5y655a1hsyfpfily6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 92488edd00eb..e46ac9009172 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -2069,6 +2069,7 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel, struct thread *thread = machine__findnew_thread(trace->host, sample->pid, sample->tid); if (thread) { + trace__fprintf_comm_tid(trace, thread, trace->output); fprintf(trace->output, "%s(", sc->name); trace__fprintf_sys_enter(trace, evsel, sample); fputc(')', trace->output); -- 2.14.4