Giter Club home page Giter Club logo

Comments (12)

jrudolph avatar jrudolph commented on August 30, 2024

Yes, that's something I'd like to do as well. I wonder if it makes sense at all to rely on the perf user-space tools to do the symbol lookup or if it wouldn't make more sense to implement the expansion in an extra tool.

from perf-map-agent.

nitsanw avatar nitsanw commented on August 30, 2024

It adds up to much the same process perf is doing anyhow, matching a range of addresses to a string. There's an optimization to be had by logging the jmethodIds rather than the long string they represent. That might be helpful for FlameGraph tooling, but will not help perf-top etc.

from perf-map-agent.

jrudolph avatar jrudolph commented on August 30, 2024

Yes, but this is slightly different as we match one address to a whole stack of frames which is nothing that perf tools currently support.

from perf-map-agent.

nitsanw avatar nitsanw commented on August 30, 2024

True, I thought we could just make it a really long string and unwind it in FlameGraphs

from perf-map-agent.

jrudolph avatar jrudolph commented on August 30, 2024

The more I think about it the more I like your simple suggestion.

from perf-map-agent.

jrudolph avatar jrudolph commented on August 30, 2024

Here's a first approximation:

https://github.com/jrudolph/perf-map-agent/tree/w/25-output-all-inlined-frames

from perf-map-agent.

jrudolph avatar jrudolph commented on August 30, 2024

I'm using this branch now for a while and it seems to work basically as intended.

I recently noticed an odd thing, though: it seems that the reported information for addresses which contain inlined code are not as granular as they are reported with PrintAssembly. I haven't yet researched deeply why that would be the case.

FTR here's OpenJDK code which produces the inline info: http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/prims/jvmtiExport.cpp#l1716

and here the code which generates code annotations for PrintAssembly: http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/code/nmethod.cpp#l2807

The effect of the problem is that the most interesting addresses in a JIT-compiled method that contains all the inlined stuff from other methods are reported as if they belonged to the JIT-compiled method (and not to the inlined ones). On the hand, it seems that code that is generated as the slow fallback will be properly annotated.

from perf-map-agent.

nitsanw avatar nitsanw commented on August 30, 2024

Are you enabling non safepoint debug info?

from perf-map-agent.

jrudolph avatar jrudolph commented on August 30, 2024

No, I wasn't! Adding -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints I'll get inlining info for the rest of the addresses as well.

Thanks, @nitsanw.

from perf-map-agent.

nitsanw avatar nitsanw commented on August 30, 2024

a classic :-) catches me out every once in a while too

from perf-map-agent.

nitsanw avatar nitsanw commented on August 30, 2024

Are you planning on merging the branch?

from perf-map-agent.

jrudolph avatar jrudolph commented on August 30, 2024

It's finished from my side, so if anyone wants to have a look, see #35 which I will soon merge.

from perf-map-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.