Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2141480imm; Thu, 9 Aug 2018 08:00:23 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzOkYgYi1qlE2ExheJIyd1g2kc9YIp8X9RYznMAWbVvisQv3MA9U8n5a7niLDA0pYxGSSkk X-Received: by 2002:a17:902:a50a:: with SMTP id s10-v6mr2359029plq.147.1533826823567; Thu, 09 Aug 2018 08:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533826823; cv=none; d=google.com; s=arc-20160816; b=YBP42d6GYC78EXqHlDfeJb4HW/iuQbizkXdH9WWdkekJoBvwU6HRx0LPz246slwnd5 KIbzkzgRc1R7L4glVfNSHuHHc7habSKzclWgMW8dD2w0xea1RKaJ3FuPBq+sWA47AA8Q 9+JDDYElcyMiafuJIZPdRnor5RA3R/5xpFBQUkA99Mt8gIcsB8WJfTXzS51zI2tepo11 YYY432TWRlOEeJrv7HGvYByu1mLGBl+BTXDT2CQX+N55tnF/Kwmmlqw1cOUoX+DjgKNH Almbc1bl8lTVsqhNm2ki40Fdjki1ZTY9rkKZ3lhhfbT2V3/DR8KTwfs4LcZnjWpoLFxH uvZg== 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:arc-authentication-results; bh=vVcEqiIvdSXmTK4ASewvaPKT0unSNO0ZA8Cv/G0ckq4=; b=ySJBwUCnJqhFM1jpN7MkBnIVO5TYGnli7cjq7cgbC3XbwtjY6S3rcbfQYy90m7xvnZ oJcYX73IGbUQIYCH/nPhVBtwjSRSZz7/f2qvnEh1x+NmlgYKJWy1AR9m01J9tvzHRF2/ WBWLsJERM7HEZuDrd/+xGyXRgXn7sTlAKdRMkSWe7hABAUrIFaPkCLvyNye7qLjDaUu6 IQSRhsftl9bjUalvt/S4V2X3QHIAClsHnzmIxzjTKqxRgF2qB+65YlNWUVVMhfv3kT26 SlVAo+MhewRikqZXl+nUqwJNrk1eMnXvhWwo1Zj+Y8cvmuoNrWklXNQZtSCp87wEfmYj WHMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W7HyuywH; 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 n10-v6si7972766pfb.316.2018.08.09.08.00.08; Thu, 09 Aug 2018 08:00:23 -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=W7HyuywH; 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 S1732603AbeHIRYR (ORCPT + 99 others); Thu, 9 Aug 2018 13:24:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:36080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732388AbeHIRYQ (ORCPT ); Thu, 9 Aug 2018 13:24:16 -0400 Received: from jouet.infradead.org (179-240-153-38.3g.claro.net.br [179.240.153.38]) (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 6F3582183D; Thu, 9 Aug 2018 14:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533826739; bh=/4ZHp0TYoRSawmM9F1dWWCDAjnWXMu8d8pkHHz2KU5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W7HyuywHdPFfxfD5gp67lc3wauTdSatOu9YfbX19wFPVegisuwJpwBr/PCxck2WyM A5lpP7neji0b01/6GimuOMgyacZLrRUYOp8J1+kL7jeZc+VYzPGDiTsC+LJ9ovojBD GOwrBa2jMgygXeTO7GhnwCuI58IX8WoDit151P/o= 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 , Steven Rostedt , Wang Nan Subject: [PATCH 03/44] perf trace: Rename some syscall_tp methods to raw_syscall Date: Thu, 9 Aug 2018 11:57:41 -0300 Message-Id: <20180809145822.21391-4-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180809145822.21391-1-acme@kernel.org> References: <20180809145822.21391-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 Because raw_syscalls have the field for the syscall number as 'id' while the syscalls:sys_{enter,exit}_NAME have it as __syscall_nr... Since we want to support both for being able to enable just a syscalls:sys_{enter,exit}_name instead of asking for raw_syscalls:sys_{enter,exit} plus filters, make the method names for each kind of tracepoint more explicit. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-4rixbfzco6tsry0w9ghx3ktb@git.kernel.org Signef-off-by: Arnaldo Carvalho de Melo Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-trace.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 7336552c22cf..039f94467968 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -239,7 +239,7 @@ static void perf_evsel__delete_priv(struct perf_evsel *evsel) perf_evsel__delete(evsel); } -static int perf_evsel__init_syscall_tp(struct perf_evsel *evsel, void *handler) +static int perf_evsel__init_raw_syscall_tp(struct perf_evsel *evsel, void *handler) { evsel->priv = malloc(sizeof(struct syscall_tp)); if (evsel->priv != NULL) { @@ -257,7 +257,7 @@ static int perf_evsel__init_syscall_tp(struct perf_evsel *evsel, void *handler) return -ENOENT; } -static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction, void *handler) +static struct perf_evsel *perf_evsel__raw_syscall_newtp(const char *direction, void *handler) { struct perf_evsel *evsel = perf_evsel__newtp("raw_syscalls", direction); @@ -268,7 +268,7 @@ static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction, void if (IS_ERR(evsel)) return NULL; - if (perf_evsel__init_syscall_tp(evsel, handler)) + if (perf_evsel__init_raw_syscall_tp(evsel, handler)) goto out_delete; return evsel; @@ -2288,14 +2288,14 @@ static int trace__add_syscall_newtp(struct trace *trace) struct perf_evlist *evlist = trace->evlist; struct perf_evsel *sys_enter, *sys_exit; - sys_enter = perf_evsel__syscall_newtp("sys_enter", trace__sys_enter); + sys_enter = perf_evsel__raw_syscall_newtp("sys_enter", trace__sys_enter); if (sys_enter == NULL) goto out; if (perf_evsel__init_sc_tp_ptr_field(sys_enter, args)) goto out_delete_sys_enter; - sys_exit = perf_evsel__syscall_newtp("sys_exit", trace__sys_exit); + sys_exit = perf_evsel__raw_syscall_newtp("sys_exit", trace__sys_exit); if (sys_exit == NULL) goto out_delete_sys_enter; @@ -2717,7 +2717,7 @@ static int trace__replay(struct trace *trace) "syscalls:sys_enter"); if (evsel && - (perf_evsel__init_syscall_tp(evsel, trace__sys_enter) < 0 || + (perf_evsel__init_raw_syscall_tp(evsel, trace__sys_enter) < 0 || perf_evsel__init_sc_tp_ptr_field(evsel, args))) { pr_err("Error during initialize raw_syscalls:sys_enter event\n"); goto out; @@ -2729,7 +2729,7 @@ static int trace__replay(struct trace *trace) evsel = perf_evlist__find_tracepoint_by_name(session->evlist, "syscalls:sys_exit"); if (evsel && - (perf_evsel__init_syscall_tp(evsel, trace__sys_exit) < 0 || + (perf_evsel__init_raw_syscall_tp(evsel, trace__sys_exit) < 0 || perf_evsel__init_sc_tp_uint_field(evsel, ret))) { pr_err("Error during initialize raw_syscalls:sys_exit event\n"); goto out; -- 2.14.4