mraleph / irhydra

Tool for displaying IR used by V8 and Dart VM optimizing compilers
Apache License 2.0
433 stars 32 forks source link

IRHydra 2 not finding any of the symbols from `perf annotate` #49

Closed dead-claudia closed 7 years ago

dead-claudia commented 7 years ago

I'm trying to find the bottleneck in very branch-heavy code, complex code with minimal non-recursive looping. I've had to rearrange functions to assist the VM (which was calling functions that were too polymorphic), and it's hard to profile with functions alone. Currently, when I try to plug perf annotate data into it, I see in the console nothing is found (despite the file being over 15MB). I've attached the three relevant files below (perf annotate > annotate.out, code.asm, and hydrogen.cfg). Note that the other two work fine.

fail.zip

mraleph commented 7 years ago

Your perf annotate output does not really contain any data for the JIT code.

You need to run perf and V8 in such a way that makes it understand JIT code in the same way it understands code from normal binaries.

One way to do it is to use V8's perf integration: see https://chromium.googlesource.com/v8/v8.git/+/82e95f597b3563e3c1947d760ba138f67d45bf6a for more details.

mraleph commented 7 years ago

If you manage to get perf annotate to output annotations for JIT compiled code and IRHydra still does not pick it up - then please reopen this issue