linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: acme@kernel.org, jolsa@kernel.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH v3 02/11] perf tools script: Support insn output for normal samples
Date: Mon, 4 Mar 2019 15:48:32 +0100	[thread overview]
Message-ID: <20190304144832.GI30476@krava> (raw)
In-Reply-To: <20190228183550.14126-3-andi@firstfloor.org>

On Thu, Feb 28, 2019 at 10:35:41AM -0800, Andi Kleen wrote:

SNIP

> @@ -1234,9 +1243,12 @@ static int perf_sample__fprintf_insn(struct perf_sample *sample,
>  {
>  	int printed = 0;
>  
> +	if (sample->insn_len == 0 && native_arch)
> +		arch_fetch_insn(sample, thread, machine);
> +
>  	if (PRINT_FIELD(INSNLEN))
>  		printed += fprintf(fp, " ilen: %d", sample->insn_len);
> -	if (PRINT_FIELD(INSN)) {
> +	if (PRINT_FIELD(INSN) && sample->insn_len) {
>  		int i;
>  
>  		printed += fprintf(fp, " insn:");
> @@ -3277,6 +3289,7 @@ int cmd_script(int argc, const char **argv)
>  		.set = false,
>  		.default_no_sample = true,
>  	};
> +	struct utsname uts;
>  	char *script_path = NULL;
>  	const char **__argv;
>  	int i, j, err = 0;
> @@ -3615,6 +3628,12 @@ int cmd_script(int argc, const char **argv)
>  	if (symbol__init(&session->header.env) < 0)
>  		goto out_delete;
>  
> +	uname(&uts);
> +	if (!strcmp(uts.machine, session->header.env.arch) ||
> +		(!strcmp(uts.machine, "x86_64") &&
> +		 !strcmp(session->header.env.arch, "i386")))

why is this check and native_arch bool necessary?
i386 data will be overed by arch/x86

jirka

  reply	other threads:[~2019-03-04 14:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 18:35 Support sample context in perf report Andi Kleen
2019-02-28 18:35 ` [PATCH v3 01/11] perf tools: Add utility function to fetch executable Andi Kleen
2019-03-04 14:48   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 02/11] perf tools script: Support insn output for normal samples Andi Kleen
2019-03-04 14:48   ` Jiri Olsa [this message]
2019-03-04 18:14     ` Andi Kleen
2019-02-28 18:35 ` [PATCH v3 03/11] perf tools report: Support nano seconds Andi Kleen
2019-02-28 18:35 ` [PATCH v3 04/11] perf tools report: Parse time quantum Andi Kleen
2019-03-04 14:49   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 05/11] perf tools report: Support time sort key Andi Kleen
2019-02-28 18:35 ` [PATCH v3 06/11] perf tools report: Use less for scripts output Andi Kleen
2019-02-28 18:35 ` [PATCH v3 07/11] perf tools report: Support running scripts for current time range Andi Kleen
2019-03-04 14:48   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 08/11] perf tools report: Support builtin perf script in scripts menu Andi Kleen
2019-02-28 18:35 ` [PATCH v3 09/11] perf tools: Add utility function to print ns time stamps Andi Kleen
2019-02-28 18:35 ` [PATCH v3 10/11] perf tools report: Implement browsing of individual samples Andi Kleen
2019-03-04 14:47   ` Jiri Olsa
2019-03-04 14:48   ` Jiri Olsa
2019-03-04 14:48   ` Jiri Olsa
2019-03-04 18:13     ` Andi Kleen
2019-03-04 15:27   ` Jiri Olsa
2019-02-28 18:35 ` [PATCH v3 11/11] perf tools: Add some new tips describing the new options Andi Kleen

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=20190304144832.GI30476@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    /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).