Re: [PATCH] perf intel-pt: Synthesize cycle events

From: Steinar H. Gunderson
Date: Tue Mar 22 2022 - 07:57:47 EST


On Mon, Mar 21, 2022 at 05:58:08PM +0100, Steinar H. Gunderson wrote:
> but I'm seeing problems with “failing to process sample” when I go from
> 10us to 1us, so I'll have to look into that.

I took a debug log from perf report; the last few lines are (I abridged
some symbol names):

symbol__new: cppgc::internal::MemberBase::GetRaw() const 0x6078a90-0x60792d0
symbol__new: cppgc::internal::BasicMember<...>::Get() const 0x6078a90-0x60792d0
symbol__new: cppgc::internal::BasicMember<...>::operator->() const 0x6078a90-0x60792d0
__symbol__inc_addr_samples: addr=0x5561dc37cbf6
__symbol__inc_addr_samples(896): ERANGE! sym->name=void blink::ElementRuleCollector::CollectMatchingRulesForList<...>(...), start=0x6074310, addr=0x6078bf6, end=0x6078a90
problem adding hist entry, skipping event
Intel PT: failed to deliver event, error -34
0x5739a8 [0x8]: failed to process type: 68 [Numerical result out of range]

and this is evidently fatal. So for whatever reason, the sample address
is attributed to some symbol, and that symbol is assumed to have a
single range (is this even necessarily true?), we refuse the event,
and then we fail the entire report. (It doesn't happen with --stdio,
though!)

I'm a bit at a loss how to debug this. It doesn't happen without the
inlines being synthesized, but I don't know if there's something wrong
with it, or if it's just the symptom (I've certainly seen “failed to
process sample” without PT before).

/* Steinar */