mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: Ian Rogers <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kajol Jain <kjain@linux.ibm.com>,
	Spoorthy S <spoorts2@in.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] perf test: Skip test_arm_callgraph_fp.sh if unwinding isn't built in
Date: Wed, 24 Jan 2024 09:24:14 +0000	[thread overview]
Message-ID: <faba2e97-7e88-9dcc-756d-f256a6304836@arm.com> (raw)
In-Reply-To: <CAP-5=fX4QQYNzEY7-6GyqWJTuH-RQxxc3jB5B1k8HZtDZCHmFw@mail.gmail.com>



On 23/01/2024 17:41, Ian Rogers wrote:
> On Tue, Jan 23, 2024 at 8:39 AM James Clark <james.clark@arm.com> wrote:
>>
>> Even though this is a frame pointer unwind test, it's testing that a
>> frame pointer stack can be augmented correctly with a partial
>> Dwarf unwind. So add a feature check so that this test skips instead of
>> fails if Dwarf unwinding isn't present.
> 
> Hi James,
> 
> Is there value in testing without the partial Dwarf unwind? Presumably

Yeah I think we could add a test for just --call-graph=fp, I don't think
there is one. But that would be separate to this test, and would be
redundant if the tests are run with a dwarf unwinder present because
this test already requires the frame pointer unwinder to be correct.

> that is covered by the existing dwarf unwind test?

There is no overlap, this test test is for --call-graph=fp, and the
dwarf test is for --call-graph=dwarf

> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/dwarf-unwind.c?h=perf-tools-next
> If the issue is inlined functions I'm surprised addr2line isn't doing
> the job properly. Is there an addr2line perf script issue here?
> 

The issue isn't inlined functions, it's when the leaf frame doesn't
insert a frame pointer. In that case we use the link register to see
what the parent function of the leaf frame was and insert it into the
frame pointer stack.

Dwarf is only used in this case to confirm if the link register was
valid at that instruction.

See commit b9f6fbb for more info. Long story short this test was only
added for that feature and it requires a dwarf unwinder to pass despite
being called test_arm_callgraph_fp

> Thanks,
> Ian
> 


>> Signed-off-by: James Clark <james.clark@arm.com>
>> ---
>>  tools/perf/tests/shell/test_arm_callgraph_fp.sh | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/tools/perf/tests/shell/test_arm_callgraph_fp.sh b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
>> index e342e6c8aa50..83b53591b1ea 100755
>> --- a/tools/perf/tests/shell/test_arm_callgraph_fp.sh
>> +++ b/tools/perf/tests/shell/test_arm_callgraph_fp.sh
>> @@ -8,6 +8,12 @@ shelldir=$(dirname "$0")
>>
>>  lscpu | grep -q "aarch64" || exit 2
>>
>> +if perf version --build-options | grep HAVE_DWARF_UNWIND_SUPPORT | grep -q OFF
>> +then
>> +  echo "Skipping, no dwarf unwind support"
>> +  exit 2
>> +fi
>> +
>>  skip_test_missing_symbol leafloop
>>
>>  PERF_DATA=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
>> --
>> 2.34.1
>>

  reply	other threads:[~2024-01-24  9:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 16:39 [PATCH 0/2] " James Clark
2024-01-23 16:39 ` [PATCH 1/2] perf version: Display availability of HAVE_DWARF_UNWIND_SUPPORT James Clark
2024-01-23 16:39 ` [PATCH 2/2] perf test: Skip test_arm_callgraph_fp.sh if unwinding isn't built in James Clark
2024-01-23 17:41   ` Ian Rogers
2024-01-24  9:24     ` James Clark [this message]
2024-01-24 18:30       ` Ian Rogers
2024-01-25 21:45 ` [PATCH 0/2] " Namhyung Kim

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=faba2e97-7e88-9dcc-756d-f256a6304836@arm.com \
    --to=james.clark@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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=spoorts2@in.ibm.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

all inboxes | Powered by JetHome®