public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* mapping instructions to dynamic languages like java, python, ruby
@ 2014-04-22 18:03 Don Zickus
  2014-04-22 18:26 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Don Zickus @ 2014-04-22 18:03 UTC (permalink / raw)
  To: peterz, acme, jolsa, namhyung; +Cc: linux-kernel, eranian, andi, wcohen

Hi,

I was discussing recently with Will Cohen about how to get perf to
understand dynamic languages (java, python, ruby) better.  Currently, perf
samples and address, stores it in a mmap region (from the kernel side),
the mmap region is read (from user side async) and stored in a file.

During 'perf report' those instruction addresses are looked up in the
dwarf table?? of the binary they were mapped to, to resolve their symbols.

This works great for statically compiled binaries (like C), where the
addresses stay the same during each run of the binary.

However, for dynamic languages like java, python, ruby not only do those
addresses change each run of the binary, those address can change
_during_ the execution of the binary.  As a result the normal perf
collection method fails.

Oprofile has a mechanism to work around this, by creating a debug library
for java that records class information.  This library is linked?? during
the initial execution of the java program and all its symbol info is
recorded in a temp file.  During post-processing this temp file is read
back in and symbol info is obtained.

However, this approach is java specific and only works for programs that
initially start with it (can not attach to running programs).

Thoughts have come up about using a SIGPROF from the kernel to signal the
userspace interpreters to dump information to a temp file that can be used
later during post-processing.

Does anyone have any thoughts or experience on this?

Cheers,
Don


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

end of thread, other threads:[~2014-04-23  6:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 18:03 mapping instructions to dynamic languages like java, python, ruby Don Zickus
2014-04-22 18:26 ` Peter Zijlstra
2014-04-22 19:05 ` Stephane Eranian
2014-04-22 19:19   ` David Ahern
2014-04-22 21:23   ` Don Zickus
2014-04-23  6:03   ` Namhyung Kim
2014-04-22 20:54 ` Andi Kleen
2014-04-22 21:24   ` Stephane Eranian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox