Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf util: Move perf_guest/host declarations

The definitions are in util.c so move the declarations to match.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Chengdong Li <chengdongli@tencent.com>
Cc: Denis Nikitin <denik@chromium.org>
Cc: Florian Fischer <florian.fischer@muhq.space>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin Liška <mliska@suse.cz>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Raul Silvera <rsilvera@google.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20230410162511.3055900-2-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
ea0c5239 f12ad272

+12 -10
+1 -1
tools/perf/builtin-diff.c
··· 6 6 * DSOs and symbol information, sort them and produce a diff. 7 7 */ 8 8 #include "builtin.h" 9 - #include "perf.h" 10 9 11 10 #include "util/debug.h" 12 11 #include "util/event.h" ··· 25 26 #include "util/spark.h" 26 27 #include "util/block-info.h" 27 28 #include "util/stream.h" 29 + #include "util/util.h" 28 30 #include <linux/err.h> 29 31 #include <linux/zalloc.h> 30 32 #include <subcmd/pager.h>
+1
tools/perf/builtin-kvm.c
··· 23 23 #include "util/data.h" 24 24 #include "util/ordered-events.h" 25 25 #include "util/kvm-stat.h" 26 + #include "util/util.h" 26 27 #include "ui/browsers/hists.h" 27 28 #include "ui/progress.h" 28 29 #include "ui/ui.h"
-4
tools/perf/perf.h
··· 2 2 #ifndef _PERF_PERF_H 3 3 #define _PERF_PERF_H 4 4 5 - #include <stdbool.h> 6 - 7 5 #ifndef MAX_NR_CPUS 8 6 #define MAX_NR_CPUS 2048 9 7 #endif 10 - 11 - extern bool perf_host, perf_guest; 12 8 13 9 enum perf_affinity { 14 10 PERF_AFFINITY_SYS = 0,
+1 -1
tools/perf/ui/hist.c
··· 11 11 #include "../util/sort.h" 12 12 #include "../util/evsel.h" 13 13 #include "../util/evlist.h" 14 - #include "../perf.h" 14 + #include "../util/util.h" 15 15 16 16 /* hist period print (hpp) functions */ 17 17
+1
tools/perf/util/cs-etm.c
··· 38 38 #include "tsc.h" 39 39 #include <tools/libc_compat.h> 40 40 #include "util/synthetic-events.h" 41 + #include "util/util.h" 41 42 42 43 struct cs_etm_auxtrace { 43 44 struct auxtrace auxtrace;
+1 -1
tools/perf/util/event.c
··· 33 33 #include "bpf-event.h" 34 34 #include "print_binary.h" 35 35 #include "tool.h" 36 - #include "../perf.h" 36 + #include "util.h" 37 37 38 38 static const char *perf_event__names[] = { 39 39 [0] = "TOTAL",
+1
tools/perf/util/evlist.c
··· 32 32 #include "util/pmu.h" 33 33 #include "util/sample.h" 34 34 #include "util/bpf-filter.h" 35 + #include "util/util.h" 35 36 #include <signal.h> 36 37 #include <unistd.h> 37 38 #include <sched.h>
+1 -1
tools/perf/util/parse-events.c
··· 25 25 #include "util/parse-branch-options.h" 26 26 #include "util/evsel_config.h" 27 27 #include "util/event.h" 28 - #include "perf.h" 29 28 #include "util/parse-events-hybrid.h" 30 29 #include "util/pmu-hybrid.h" 31 30 #include "util/bpf-filter.h" 31 + #include "util/util.h" 32 32 #include "tracepoint.h" 33 33 #include "thread_map.h" 34 34
+1 -1
tools/perf/util/session.c
··· 33 33 #include "stat.h" 34 34 #include "tsc.h" 35 35 #include "ui/progress.h" 36 - #include "../perf.h" 36 + #include "util.h" 37 37 #include "arch/common.h" 38 38 #include "units.h" 39 39 #include <internal/lib.h>
+1 -1
tools/perf/util/top.c
··· 11 11 #include "parse-events.h" 12 12 #include "symbol.h" 13 13 #include "top.h" 14 - #include "../perf.h" 14 + #include "util.h" 15 15 #include <inttypes.h> 16 16 17 17 #define SNPRINTF(buf, size, fmt, args...) \
+3
tools/perf/util/util.h
··· 20 20 21 21 extern const char *input_name; 22 22 23 + extern bool perf_host; 24 + extern bool perf_guest; 25 + 23 26 /* General helper functions */ 24 27 void usage(const char *err) __noreturn; 25 28 void die(const char *err, ...) __noreturn __printf(1, 2);