linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* missing stack frames
@ 2023-02-09  1:53 Pete Stevenson
  2023-02-09  3:36 ` Ian Rogers
  0 siblings, 1 reply; 4+ messages in thread
From: Pete Stevenson @ 2023-02-09  1:53 UTC (permalink / raw)
  To: linux-perf-users

We have crafted a program where with some definite expectations about
what stack traces we expect, but in less than 1% of the samples, we
see one stack frame missing.

Roughly speaking, we see the following:
libc -> main -> foo -> bar (99.49%) (expected)
libc -> main -> bar (0.51%) (not expected)

That is, in 0.51% +/- of the cases, the stack trace samples collected
by perf appear to indicate that "main" is directly calling "bar" which
we do not believe to be the case. We first observed this in a slightly
more complicated setup with a different profiler, but have been
chasing this down to a fairly reductive example. We ran the perf
profiler using a few different command line options (with and without
-g and --call-graph dwarf) and saw the same basic results with each
method.

Curious to know if anyone understands the underlying cause of this...
Is it something like a non-atomic sample of the stack trace, i.e. the
stack frames are being manipulated while the stack trace is being
sampled? Something else?

Thank you,
John P. (Pete) Stevenson

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

end of thread, other threads:[~2023-02-13 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09  1:53 missing stack frames Pete Stevenson
2023-02-09  3:36 ` Ian Rogers
2023-02-13  9:54   ` James Clark
2023-02-13 17:29     ` Pete Stevenson

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).