Path: csiph.com!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: tip-bot for Arnaldo Carvalho de Melo Newsgroups: linux.kernel Subject: [tip:perf/core] perf trace beauty: Export the pid beautifier for use in more places Date: Thu, 20 Jul 2017 10:50:02 +0200 Message-ID: Reply-To: jolsa@kernel.org, dsahern@gmail.com, acme@redhat.com, namhyung@kernel.org, wangnan0@huawei.com, linux-kernel@vger.kernel.org, mingo@kernel.org, adrian.hunter@intel.com, hpa@zytor.com, tglx@linutronix.de Git-Commit-ID: ff2f1b2d35aeb672200af4772db1847fdcdfd77b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 58 Organization: linux.* mail to news gateway X-Original-Cc: hpa@zytor.com, tglx@linutronix.de, adrian.hunter@intel.com, mingo@kernel.org, linux-kernel@vger.kernel.org, namhyung@kernel.org, wangnan0@huawei.com, jolsa@kernel.org, dsahern@gmail.com, acme@redhat.com X-Original-Date: Thu, 20 Jul 2017 01:45:24 -0700 X-Original-Message-ID: X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1692578 Commit-ID: ff2f1b2d35aeb672200af4772db1847fdcdfd77b Gitweb: http://git.kernel.org/tip/ff2f1b2d35aeb672200af4772db1847fdcdfd77b Author: Arnaldo Carvalho de Melo AuthorDate: Fri, 14 Jul 2017 15:21:40 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 18 Jul 2017 23:14:04 -0300 perf trace beauty: Export the pid beautifier for use in more places Now that the beautifiers are being split into multiple source and object files, we will need more of them exported, do it for the 'pid' one, will be used to augment the return of some syscalls that may return a 'pid', such as fcntl(fd, F_GETOWN). Will also be used for fcntl(fd, F_SETOWN, pid). Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7gr5nt9p5skp4i1w0ja1w272@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/trace/beauty/beauty.h | 3 +++ tools/perf/trace/beauty/pid.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/trace/beauty/beauty.h b/tools/perf/trace/beauty/beauty.h index 790e830..9ccf0f3 100644 --- a/tools/perf/trace/beauty/beauty.h +++ b/tools/perf/trace/beauty/beauty.h @@ -43,6 +43,9 @@ size_t syscall_arg__scnprintf_int(char *bf, size_t size, struct syscall_arg *arg size_t syscall_arg__scnprintf_long(char *bf, size_t size, struct syscall_arg *arg); #define SCA_LONG syscall_arg__scnprintf_long +size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg); +#define SCA_PID syscall_arg__scnprintf_pid + size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_arg *arg); #define SCA_FCNTL_CMD syscall_arg__scnprintf_fcntl_cmd diff --git a/tools/perf/trace/beauty/pid.c b/tools/perf/trace/beauty/pid.c index 07486ea..b6d419e 100644 --- a/tools/perf/trace/beauty/pid.c +++ b/tools/perf/trace/beauty/pid.c @@ -1,4 +1,4 @@ -static size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg) +size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg) { int pid = arg->val; struct trace *trace = arg->trace; @@ -17,5 +17,3 @@ static size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_a return printed; } - -#define SCA_PID syscall_arg__scnprintf_pid