public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf tools: Fix object code reading for PTI entry trampolines
Date: Tue, 5 Jun 2018 10:41:42 -0300	[thread overview]
Message-ID: <20180605134142.GE4899@kernel.org> (raw)
In-Reply-To: <1528183800-21577-1-git-send-email-adrian.hunter@intel.com>

Em Tue, Jun 05, 2018 at 10:30:00AM +0300, Adrian Hunter escreveu:
> Fix object code reading and the "Object code reading" test for PTI entry
> trampolines.
> 
> perf tools uses map__rip_2objdump() to calculate objdump virtual addresses.
> map__rip_2objdump() needs to be amended to deal with PTI entry trampolines.
> Also the "Object code reading" test will not create maps for the PTI entry
> trampolines unless the machine environment exists to show that the arch is
> x86_64.

So, I split it into two patches, right at the "Also" part in your
description:

[acme@seventh perf]$ git log --oneline -2
36800a71b000 (HEAD -> perf/core) perf map: Consider PTI entry trampolines in rip_2objdump()
2f6777b74f6d perf test code-reading: Fix perf_env setup for PTI entry trampolines
[acme@seventh perf]$

https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=perf/core

And this test fails way less often, but still does, for instance:

# while true ; do perf test -v object 2>out.txt ; grep -i fail out.txt && break ; done
dso__data_read_offset failed
Object code reading: FAILED!
#
[root@seventh ~]# tail out.txt 
File is: /proc/kcore
On file address is: 0x7fff892300df
kcore map tested already - skipping
Reading object code for memory address: 0x4a020f
File is: /home/acme/bin/perf (deleted)
On file address is: 0xa020f
dso__data_read_offset failed
test child finished with -1
---- end ----
Object code reading: FAILED!
[root@seventh ~]#

I start that loop and then try running 'make -C tools/perf O=/tmp/build/perf install-bin',
to generate some load.

But now at least on a quiet system it works.

- Arnaldo

  reply	other threads:[~2018-06-05 13:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05  7:30 [PATCH] perf tools: Fix object code reading for PTI entry trampolines Adrian Hunter
2018-06-05 13:41 ` Arnaldo Carvalho de Melo [this message]
2018-06-05 14:08   ` Adrian Hunter
2018-06-05 15:31     ` Arnaldo Carvalho de Melo
2018-06-07  8:20 ` [tip:perf/urgent] perf test code-reading: Fix perf_env setup " tip-bot for Adrian Hunter
2018-06-07  8:20 ` [tip:perf/urgent] perf map: Consider PTI entry trampolines in rip_2objdump() tip-bot for Adrian Hunter

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=20180605134142.GE4899@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@redhat.com \
    --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