Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp67160imm; Wed, 5 Sep 2018 15:07:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaOpfWe4LcLK9TCHtZ1emUPl5NQQkMGB5VA26vG1OT+j/coM0T12U0DQLTRSx8dd7CsMeg5 X-Received: by 2002:a17:902:7145:: with SMTP id u5-v6mr32192064plm.259.1536185222232; Wed, 05 Sep 2018 15:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536185222; cv=none; d=google.com; s=arc-20160816; b=AT74e5N5F/4zoGyKigB3lsGW6PLlRpnw4meh6UpPWJie8EVbkiEZd3/opb1nkNn6Lk E8Yn64+sgVIJYF5LrMrR4xYWEvL6nLpz2cxN2B2bHWHd7A0Cjy6vDdjF0YK7ZJ28NMY0 BcqnH9jFJqXgBJNG4Ta/yfVq9ebMzFBX8EDe3OcaZbCGmtsAqlCg0yUADdE2RTcq3gBt mc1B5Z8eN+9vI3G59IhvX4ZOVle88Up/QS2lTt4ZCYNPidehyjfKDyyDvOYC20XKu1UI Gn+jFBnBSRuVNhZiYI7WOIGuWL7VZOQyuhzqIxcbYhwVmUvLwbGjweMw09C3338Apm2m bm4w== 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=8NE+jRqqrhIUFl8RoGTlxP2sj/Zx0NVNlHn2BD6vBQg=; b=y/YTy8GKBIu+YnUv7uHq5l6hrgFzcMKW7+IvDCgHoYnkoqLG3tcFaAuiyrUlIQAMlB cBr91fVWrpnAwe3l5pVeXtkudavkFk77Xs7F6X9rdYZolCyexLQmplLfyRhlvMcNJ4GK AQQZIAyYb/CoGVj27b0WkqZsZKHh1OHgiLqFbaLyjnPsoD2wco+VMDbiOa0qg6PhGsBN lEGud6JtYV79vVizB9xjcoqtDU1SD5PtKby1qH031+x9PRsgX1VmdEWOvIBOtCz0o2zR Be82QJGrs3jTghpe06htpRVY330Vn5scA1SxPZN3LBu8oBRWHm0wKmgcQLT67aYWjkoM gjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eLsfMKx0; 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 l63-v6si3125263plb.106.2018.09.05.15.06.46; Wed, 05 Sep 2018 15:07:02 -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=eLsfMKx0; 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 S1728122AbeIFChc (ORCPT + 99 others); Wed, 5 Sep 2018 22:37:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:51634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbeIFChb (ORCPT ); Wed, 5 Sep 2018 22:37:31 -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 91AF22073D; Wed, 5 Sep 2018 22:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536185119; bh=CGjFpsI40/cdUq9brOcMxZyq1NqJDr1yQcZ/TtayN7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eLsfMKx0cDTnWP6B212LL2Hy6aX3rIR8VPT/jbNpeZkiTHI+Fg5AAl4iqA4CgKewL A5N5Z+iqYq7KYR3f+ZKDR7eyjebwqM8AaFpWtL/2PLxg51nhg/fFlwbXUuGq4wSA2D 7LWBksmP+wBPsML3CcEjQPtunBjt1+XCedbjRE/E= 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 10/77] perf trace: Augment 'newstat' (aka 'stat') filename ptr Date: Wed, 5 Sep 2018 19:03:33 -0300 Message-Id: <20180905220440.20256-11-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 This one will need some more work, that 'statbuf' pointer requires a beautifier in 'perf trace'. # perf trace -e tools/perf/examples/bpf/augmented_syscalls.c 0.000 weechat/3596 stat(filename: /etc/localtime, statbuf: 0x7ffd87d11f60) 0.186 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_stat/format) 0.279 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_newstat/for) 0.670 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat/form) 60.805 DNS Res~er #20/21308 stat(filename: /etc/resolv.conf, statbuf: 0x7ffa733fe4a0) 60.836 DNS Res~er #20/21308 open(filename: /etc/hosts, flags: CLOEXEC) 60.931 perf/29818 openat(dfd: CWD, filename: /sys/kernel/debug/tracing/events/syscalls/sys_enter_open/format) 607.070 DNS Res~er #21/29812 stat(filename: /etc/resolv.conf, statbuf: 0x7ffa5e1fe3f0) 607.098 DNS Res~er #21/29812 open(filename: /etc/hosts, flags: CLOEXEC) 999.336 weechat/3596 stat(filename: /etc/localtime, statbuf: 0x7ffd87d11f60) ^C# Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-4lhabe7m4uzo76lnqpyfmnvk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/examples/bpf/augmented_syscalls.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/perf/examples/bpf/augmented_syscalls.c b/tools/perf/examples/bpf/augmented_syscalls.c index e8486e8597de..a9695c7f7aab 100644 --- a/tools/perf/examples/bpf/augmented_syscalls.c +++ b/tools/perf/examples/bpf/augmented_syscalls.c @@ -83,4 +83,15 @@ struct syscall_enter_inotify_add_watch_args { augmented_filename_syscall_enter(inotify_add_watch); +struct statbuf; + +struct syscall_enter_newstat_args { + unsigned long long common_tp_fields; + long syscall_nr; + char *filename_ptr; + struct stat *statbuf; +}; + +augmented_filename_syscall_enter(newstat); + license(GPL); -- 2.14.4