All of lore.kernel.org
 help / color / mirror / Atom feed
* perf tool: About "perf arm64: Inject missing frames when using 'perf record --call-graph=fp'"
@ 2022-04-05 14:04 John Garry
  2022-04-06  9:08 ` James Clark
  0 siblings, 1 reply; 4+ messages in thread
From: John Garry @ 2022-04-05 14:04 UTC (permalink / raw)
  To: alexandre.truong
  Cc: linux-perf-users, jolsa@kernel.org >> Jiri Olsa,
	german.gomez, james.clark, Linux Kernel Mailing List,
	Arnaldo Carvalho de Melo

Hi Alexandre,

I notice that with commit b9f6fbb3b2c2 ("perf arm64: Inject missing 
frames when using 'perf record --call-graph=fp'") that I get messages 
spewing the console when running perf record+report, as below:

john@ubuntu:~/linux$sudo tools/perf/perf record -ag fio null12.fio
john@ubuntu:~/linux$sudo tools/perf/perf report > report
unwind: can't read reg 29
unwind: can't read reg 29
unwind: can't read reg 29
unwind: can't read reg 29
...

Do you know the possible cause? I haven't checked...

Thanks,
john

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf tool: About "perf arm64: Inject missing frames when using 'perf record --call-graph=fp'"
  2022-04-05 14:04 perf tool: About "perf arm64: Inject missing frames when using 'perf record --call-graph=fp'" John Garry
@ 2022-04-06  9:08 ` James Clark
  2022-04-06 11:28   ` John Garry
  2022-04-06 15:00   ` James Clark
  0 siblings, 2 replies; 4+ messages in thread
From: James Clark @ 2022-04-06  9:08 UTC (permalink / raw)
  To: John Garry, alexandre.truong
  Cc: linux-perf-users, jolsa@kernel.org >> Jiri Olsa,
	german.gomez, Linux Kernel Mailing List,
	Arnaldo Carvalho de Melo



On 05/04/2022 15:04, John Garry wrote:
> Hi Alexandre,
> 
> I notice that with commit b9f6fbb3b2c2 ("perf arm64: Inject missing frames when using 'perf record --call-graph=fp'") that I get messages spewing the console when running perf record+report, as below:
> 
> john@ubuntu:~/linux$sudo tools/perf/perf record -ag fio null12.fio
> john@ubuntu:~/linux$sudo tools/perf/perf report > report
> unwind: can't read reg 29
> unwind: can't read reg 29
> unwind: can't read reg 29
> unwind: can't read reg 29
> ...
> 
> Do you know the possible cause? I haven't checked...

Hi John,

I'm going to look into this today. I expect the cause is because we only record
the link register for this change and then do a best effort unwind to see if
we can get the return address just from that. So I don't think this is a major issue,
probably the outcome will be that I mask any of these errors just for this call
to libunwind that we added. The other main call to libunwind should still print
these errors.

One thing that is interesting is why we didn't see this when we were testing
the patch before, and we've also found it a little bit difficult to reproduce here.
So there might be more to it than just masking the error, but I'm not sure yet.

Either way, I don't expect that any unwinding is broken, just that it's
printing an annoying message.

James

> 
> Thanks,
> john

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf tool: About "perf arm64: Inject missing frames when using 'perf record --call-graph=fp'"
  2022-04-06  9:08 ` James Clark
@ 2022-04-06 11:28   ` John Garry
  2022-04-06 15:00   ` James Clark
  1 sibling, 0 replies; 4+ messages in thread
From: John Garry @ 2022-04-06 11:28 UTC (permalink / raw)
  To: James Clark, alexandre.truong
  Cc: linux-perf-users, jolsa@kernel.org >> Jiri Olsa,
	german.gomez, Linux Kernel Mailing List,
	Arnaldo Carvalho de Melo

On 06/04/2022 10:08, James Clark wrote:
> 
> 
> On 05/04/2022 15:04, John Garry wrote:
>> Hi Alexandre,
>>
>> I notice that with commit b9f6fbb3b2c2 ("perf arm64: Inject missing frames when using 'perf record --call-graph=fp'") that I get messages spewing the console when running perf record+report, as below:
>>
>> john@ubuntu:~/linux$sudo tools/perf/perf record -ag fio null12.fio
>> john@ubuntu:~/linux$sudo tools/perf/perf report > report
>> unwind: can't read reg 29
>> unwind: can't read reg 29
>> unwind: can't read reg 29
>> unwind: can't read reg 29
>> ...
>>
>> Do you know the possible cause? I haven't checked...
> 
> Hi John,
> 
> I'm going to look into this today.

Great

  I expect the cause is because we only record
>> the link register for this change and then do a best effort unwind to see if
> we can get the return address just from that. So I don't think this is a major issue,
> probably the outcome will be that I mask any of these errors just for this call
> to libunwind that we added. The other main call to libunwind should still print
> these errors.
> 
> One thing that is interesting is why we didn't see this when we were testing
> the patch before, and we've also found it a little bit difficult to reproduce here.
> So there might be more to it than just masking the error, but I'm not sure yet.
> 
> Either way, I don't expect that any unwinding is broken, just that it's
> printing an annoying message.

Yeah, the actual ouput looks ok at a glance. I really didn't check much.

Thanks,
John


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf tool: About "perf arm64: Inject missing frames when using 'perf record --call-graph=fp'"
  2022-04-06  9:08 ` James Clark
  2022-04-06 11:28   ` John Garry
@ 2022-04-06 15:00   ` James Clark
  1 sibling, 0 replies; 4+ messages in thread
From: James Clark @ 2022-04-06 15:00 UTC (permalink / raw)
  To: John Garry, alexandre.truong
  Cc: linux-perf-users, jolsa@kernel.org >> Jiri Olsa,
	german.gomez, Linux Kernel Mailing List,
	Arnaldo Carvalho de Melo



On 06/04/2022 10:08, James Clark wrote:
> 
> 
> On 05/04/2022 15:04, John Garry wrote:
>> Hi Alexandre,
>>
>> I notice that with commit b9f6fbb3b2c2 ("perf arm64: Inject missing frames when using 'perf record --call-graph=fp'") that I get messages spewing the console when running perf record+report, as below:
>>
>> john@ubuntu:~/linux$sudo tools/perf/perf record -ag fio null12.fio
>> john@ubuntu:~/linux$sudo tools/perf/perf report > report
>> unwind: can't read reg 29
>> unwind: can't read reg 29
>> unwind: can't read reg 29
>> unwind: can't read reg 29
>> ...
>>
>> Do you know the possible cause? I haven't checked...
> 
> Hi John,
> 
> I'm going to look into this today. I expect the cause is because we only record
> the link register for this change and then do a best effort unwind to see if
> we can get the return address just from that. So I don't think this is a major issue,
> probably the outcome will be that I mask any of these errors just for this call
> to libunwind that we added. The other main call to libunwind should still print
> these errors.
> 
> One thing that is interesting is why we didn't see this when we were testing
> the patch before, and we've also found it a little bit difficult to reproduce here.
> So there might be more to it than just masking the error, but I'm not sure yet.
> 
> Either way, I don't expect that any unwinding is broken, just that it's
> printing an annoying message.
> 

In my case it was showing the error because I'd installed libc debug symbols which
explains why we might have missed it before. Also it's looking for the frame pointer
register which doesn't make sense to save because that would be used to look into
the stack which isn't recorded.

So for that reason I think suppressing the error is the best thing to do. I've sent
"[PATCH] perf: Don't show unwind error messages when augmenting frame pointer stack"

> James
> 
>>
>> Thanks,
>> john

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-06 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 14:04 perf tool: About "perf arm64: Inject missing frames when using 'perf record --call-graph=fp'" John Garry
2022-04-06  9:08 ` James Clark
2022-04-06 11:28   ` John Garry
2022-04-06 15:00   ` James Clark

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.