Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5875816ybi; Sun, 21 Jul 2019 04:28:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcbGx6iAz36sTYubixuAblHFJPxCE2Y4xQWYpnpITT/85+nmj8yUjXgp5GHQ4EhOX5z+6j X-Received: by 2002:a63:6c7:: with SMTP id 190mr65052175pgg.7.1563708522812; Sun, 21 Jul 2019 04:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563708522; cv=none; d=google.com; s=arc-20160816; b=S7enFmzu7MIrHiI2eWwHiu75K7CCyLkP5NXt6FREOouVMFq/yOfmhDs2+wK2e2Bkmq rgYjbKOtRQVzfHZg4sbI20sHPP/pB/44S2AQgkKm7mOg3wJ6XSkFR+nvopEDB0bubqhK YSk1fNMNLH9hI/2eNEfG8vAjdu+j3FTy1sin5ssGgK0n8eJ8Eq4OBemYN/MKvLqHt02+ 4p0iwto3fgamavRaVNUcnNtxHWKIiMIqGcwKJyOL/CJxFQ3BU4hvf5x/dBGABPfOoz3C oPKGzq5rYfDSoYsfU5SqmlNgKOeXRVzyX0TT/E6swP0Cxvz1vgdcdBWmFvHoqXG20ZvH vyaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=E/59c8czL4BfzDEdmZ/5RVmt7hdwONqiZgAE1gUVgtc=; b=S+6gPcd5RupYL+T2KNGoUNCDPaU7AUajHfJthVT9cRkLawBVzt4h2ZVuOSHhrH0BQd FqbJQWi8eCFwG4lX2HAR4CGuUNyZm88zt33IIrXN0IhtQe4jPnXKtBLpI01uhqsB14CM ws2pcb/x8FuxiPySTilZfq56pu+a/y6rjpz/M93C/C02tW9LKLM6yXbcalA9Jp0l5oIn KQtrHyGLoJFPZt65bJl3hMwnk2e2lCyN8AgHYco6r2YLvnPrbHCpH/SgFoYstEQg8HyW Y9fK0Miep1jJvawRFFgnRz2EVeinac7D8BdYbaRZLf0FpfVLVTdlZG7LJvALEjeDzXVF b7jw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 o23si9097913pfp.131.2019.07.21.04.28.27; Sun, 21 Jul 2019 04:28:42 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726720AbfGUL1Z (ORCPT + 99 others); Sun, 21 Jul 2019 07:27:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36594 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbfGUL1Y (ORCPT ); Sun, 21 Jul 2019 07:27:24 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C4A5C8535C; Sun, 21 Jul 2019 11:27:23 +0000 (UTC) Received: from krava.redhat.com (ovpn-204-23.brq.redhat.com [10.40.204.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E32F5D9D3; Sun, 21 Jul 2019 11:27:19 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Andi Kleen , Alexey Budankov , Michael Petlan Subject: [PATCH 14/79] perf tools: Rename perf_evsel__open to evsel__open Date: Sun, 21 Jul 2019 13:24:01 +0200 Message-Id: <20190721112506.12306-15-jolsa@kernel.org> In-Reply-To: <20190721112506.12306-1-jolsa@kernel.org> References: <20190721112506.12306-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sun, 21 Jul 2019 11:27:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Renaming perf_evsel__open to evsel__open, so we don't have a name clash when we add perf_evsel__open in libperf. Link: http://lkml.kernel.org/n/tip-tdrno85i5s3d7kusfpl3tjne@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-top.c | 2 +- tools/perf/tests/mmap-basic.c | 2 +- tools/perf/tests/openat-syscall-all-cpus.c | 2 +- tools/perf/util/evlist.c | 4 ++-- tools/perf/util/evsel.c | 8 ++++---- tools/perf/util/evsel.h | 4 ++-- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/python.c | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 06966a2c2cdd..7f933997b6d0 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -739,7 +739,7 @@ static int record__open(struct record *rec) evlist__for_each_entry(evlist, pos) { try_again: - if (perf_evsel__open(pos, pos->cpus, pos->threads) < 0) { + if (evsel__open(pos, pos->cpus, pos->threads) < 0) { if (perf_evsel__fallback(pos, errno, msg, sizeof(msg))) { if (verbose > 0) ui__warning("%s\n", msg); diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 6c0c2b78093a..5886389f6a40 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -989,7 +989,7 @@ static int perf_top__start_counters(struct perf_top *top) evlist__for_each_entry(evlist, counter) { try_again: - if (perf_evsel__open(counter, top->evlist->cpus, + if (evsel__open(counter, top->evlist->cpus, top->evlist->threads) < 0) { /* diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index 16b8a4e5de8f..40511025208f 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c @@ -84,7 +84,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse evlist__add(evlist, evsels[i]); - if (perf_evsel__open(evsels[i], cpus, threads) < 0) { + if (evsel__open(evsels[i], cpus, threads) < 0) { pr_debug("failed to open counter: %s, " "tweak /proc/sys/kernel/perf_event_paranoid?\n", str_error_r(errno, sbuf, sizeof(sbuf))); diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c index 001a0e8e6998..f96cbd304024 100644 --- a/tools/perf/tests/openat-syscall-all-cpus.c +++ b/tools/perf/tests/openat-syscall-all-cpus.c @@ -48,7 +48,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int goto out_cpu_map_delete; } - if (perf_evsel__open(evsel, cpus, threads) < 0) { + if (evsel__open(evsel, cpus, threads) < 0) { pr_debug("failed to open counter: %s, " "tweak /proc/sys/kernel/perf_event_paranoid?\n", str_error_r(errno, sbuf, sizeof(sbuf))); diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 47516db62424..4627cc47de3e 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1405,7 +1405,7 @@ int perf_evlist__open(struct evlist *evlist) perf_evlist__update_id_pos(evlist); evlist__for_each_entry(evlist, evsel) { - err = perf_evsel__open(evsel, evsel->cpus, evsel->threads); + err = evsel__open(evsel, evsel->cpus, evsel->threads); if (err < 0) goto out_err; } @@ -1918,7 +1918,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist, goto out_delete_evlist; evlist__for_each_entry(evlist, counter) { - if (perf_evsel__open(counter, evlist->cpus, + if (evsel__open(counter, evlist->cpus, evlist->threads) < 0) goto out_delete_evlist; } diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index c9723c2d57c9..f365d0685268 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1825,8 +1825,8 @@ static int perf_event_open(struct evsel *evsel, return fd; } -int perf_evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus, - struct perf_thread_map *threads) +int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus, + struct perf_thread_map *threads) { int cpu, thread, nthreads; unsigned long flags = PERF_FLAG_FD_CLOEXEC; @@ -2086,13 +2086,13 @@ void perf_evsel__close(struct evsel *evsel) int perf_evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus) { - return perf_evsel__open(evsel, cpus, NULL); + return evsel__open(evsel, cpus, NULL); } int perf_evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads) { - return perf_evsel__open(evsel, NULL, threads); + return evsel__open(evsel, NULL, threads); } static int perf_evsel__parse_id_sample(const struct evsel *evsel, diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index ecea51a918e0..d43409bb07c5 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -302,8 +302,8 @@ int perf_evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus); int perf_evsel__open_per_thread(struct evsel *evsel, struct perf_thread_map *threads); -int perf_evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus, - struct perf_thread_map *threads); +int evsel__open(struct evsel *evsel, struct perf_cpu_map *cpus, + struct perf_thread_map *threads); void perf_evsel__close(struct evsel *evsel); struct perf_sample; diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 40087cf74dd1..decb66d243ca 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -2320,7 +2320,7 @@ static bool is_event_supported(u8 type, unsigned config) evsel = evsel__new(&attr); if (evsel) { - open_return = perf_evsel__open(evsel, NULL, tmap); + open_return = evsel__open(evsel, NULL, tmap); ret = open_return >= 0; if (open_return == -EACCES) { @@ -2332,7 +2332,7 @@ static bool is_event_supported(u8 type, unsigned config) * */ evsel->attr.exclude_kernel = 1; - ret = perf_evsel__open(evsel, NULL, tmap) >= 0; + ret = evsel__open(evsel, NULL, tmap) >= 0; } evsel__delete(evsel); } diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 48c951a4a76b..3eb7348d29f8 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -817,7 +817,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel, * This will group just the fds for this single evsel, to group * multiple events, use evlist.open(). */ - if (perf_evsel__open(evsel, cpus, threads) < 0) { + if (evsel__open(evsel, cpus, threads) < 0) { PyErr_SetFromErrno(PyExc_OSError); return NULL; } -- 2.21.0