linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH 21/25] perf evsel: Switch to libperf's cpumap.h
Date: Thu, 22 Aug 2019 18:00:56 -0300	[thread overview]
Message-ID: <20190822210100.3461-22-acme@kernel.org> (raw)
In-Reply-To: <20190822210100.3461-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

We don't need what is in perf's util/cpumap.h, just the struct cpu_map
that is in libperf's internal/cpumap.h file to cover this one case:

  tools/perf/util/evsel.h:215:27: error: dereferencing pointer to incomplete type ‘struct perf_cpu_map’
  215 |  return evsel__cpus(evsel)->nr;

So switch to libperf's cpumap.h and add some missing struct foward
declarations and include sys/types.h to get pid_t.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-ufjkpohijti05ggk69s91ktf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index cd336cf2eaa9..5a351cae66df 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -5,14 +5,17 @@
 #include <linux/list.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <sys/types.h>
 #include <linux/perf_event.h>
 #include <linux/types.h>
 #include <internal/evsel.h>
 #include <perf/evsel.h>
 #include "symbol_conf.h"
-#include "cpumap.h"
+#include <internal/cpumap.h>
 
+struct addr_location;
 struct evsel;
+union perf_event;
 
 /*
  * Per fd, to map back from PERF_SAMPLE_ID to evsel, only used when there are
-- 
2.21.0


  parent reply	other threads:[~2019-08-22 21:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 21:00 [GIT PULL] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 01/25] tools headers: Add missing perf_event.h include Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 02/25] perf tools: Use perf_cpu_map__nr instead of cpu_map__nr Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 03/25] libperf: Move perf's cpu_map__empty() to perf_cpu_map__empty() Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 04/25] libperf: Move perf's cpu_map__idx() to perf_cpu_map__idx() Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 05/25] perf arm64: Add missing debug.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 06/25] perf kvm s390: Add missing string.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 07/25] perf metricgroup: Remove needless includes from metricgroup.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 08/25] perf evsel: Move xyarray.h from evsel.c to evsel.h to reduce include dep tree Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 09/25] perf counts: Add missing headers needed for types used Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 10/25] perf bpf: Add missing xyarray.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 11/25] perf evlist: " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 12/25] perf script: Add missing counts.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 13/25] perf tests: " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 14/25] perf stat: " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 15/25] perf scripting python: Add missing counts.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 16/25] perf evsel: Add missing perf/evsel.h header in util/evsel.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 17/25] perf evsel: Remove needless counts.h header from util/evsel.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 18/25] perf evsel: Remove needless stddef.h " Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 19/25] perf evsel: util/evsel.h needs stdio.h as it uses FILE Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 20/25] perf x86 kvm-stat: Add missing string.h header Arnaldo Carvalho de Melo
2019-08-22 21:00 ` Arnaldo Carvalho de Melo [this message]
2019-08-22 21:00 ` [PATCH 22/25] perf cpumap: Remove needless includes from cpumap.h Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 23/25] libperf: Add perf_thread_map__nr/perf_thread_map__pid functions Arnaldo Carvalho de Melo
2019-08-22 21:00 ` [PATCH 24/25] perf c2c: Fix report with offline cpus Arnaldo Carvalho de Melo
2019-08-22 21:01 ` [PATCH 25/25] libperf: Fix alignment trap with xyarray contents in 'perf stat' Arnaldo Carvalho de Melo
2019-08-23 10:30 ` [GIT PULL] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190822210100.3461-22-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).