linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com, linux-perf-users@vger.kernel.org,
	imx@lists.linux.dev
Subject: Re: [PATCH v2] perf python: include "util/sample.h"
Date: Mon, 19 Aug 2024 14:44:41 -0300	[thread overview]
Message-ID: <ZsOEifE05otnUtdV@x1> (raw)
In-Reply-To: <20240819023403.201324-1-xu.yang_2@nxp.com>

On Mon, Aug 19, 2024 at 10:34:03AM +0800, Xu Yang wrote:
> The 32-bit arm build system will complain:
> 
> tools/perf/util/python.c:75:28: error: field ‘sample’ has incomplete type
>    75 |         struct perf_sample sample;
> 
> However, arm64 build system doesn't complain this.
> 
> The root cause is arm64 define "HAVE_KVM_STAT_SUPPORT := 1" in
> tools/perf/arch/arm64/Makefile, but arm arch doesn't define this.
> This will lead to kvm-stat.h include other header files on arm64 build
> system, especially "util/sample.h" for util/python.c.
> 
> This will try to directly include "util/sample.h" for "util/python.c" to
> avoid such build issue on arm platform.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> 
> ---
> Changes in v2:
>  - include "util/sample.h" in "util/python.c"

Thanks, applied to perf-tools-next,

- Arnaldo
> ---
>  tools/perf/util/python.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
> index 3be882b2e845..31a223eaf8e6 100644
> --- a/tools/perf/util/python.c
> +++ b/tools/perf/util/python.c
> @@ -20,6 +20,7 @@
>  #include "util/env.h"
>  #include "util/kvm-stat.h"
>  #include "util/kwork.h"
> +#include "util/sample.h"
>  #include "util/lock-contention.h"
>  #include <internal/lib.h>
>  #include "../builtin.h"
> -- 
> 2.34.1

  reply	other threads:[~2024-08-19 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19  2:34 [PATCH v2] perf python: include "util/sample.h" Xu Yang
2024-08-19 17:44 ` Arnaldo Carvalho de Melo [this message]
2024-08-25 14:21   ` Ben Hutchings

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=ZsOEifE05otnUtdV@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=imx@lists.linux.dev \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=xu.yang_2@nxp.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).