Skip to content

Fix frame-pointer to improve epoll flamegraph tracing - #6110

Closed
tjake wants to merge 1 commit into
netty:4.1from
tjake:fix-epoll-frame-pointer
Closed

tjake wants to merge 1 commit into
netty:4.1from
tjake:fix-epoll-frame-pointer

Conversation

@tjake

@tjake tjake commented Dec 6, 2016

Copy link
Copy Markdown
Contributor

This patch allows linux perf to track the frame pointer from java to epoll native lib. This cleans up flamegraphs which use epoll.

There is also an issue with the extracted native lib being deleted by the netty library loader util. I'm not sure how you want to deal with that, perhaps a property to keep it around for perf testing?

Motivation:

When attempting to flamegraph netty w/ epoll it was noticed the stacks are lost going from
java to epoll lib.

Modifications:

added the -fno-omit-framepointer flag to compiler flags to ensure the fp is kept intact

Result:

Flamegraphs will now show native code in the same stack as java code using perf-java-flames
@tjake
tjake force-pushed the fix-epoll-frame-pointer branch from bed338a to 1dca507 Compare December 6, 2016 15:33
@tjake

tjake commented Dec 6, 2016

Copy link
Copy Markdown
Contributor Author

done.

@normanmaurer normanmaurer added this to the 4.0.43.Final milestone Dec 6, 2016
@normanmaurer normanmaurer self-assigned this Dec 6, 2016
@normanmaurer

Copy link
Copy Markdown
Member

@tjake thanks a lot

Cherry-picked into 4.1 (8d664fa) and 4.0 (06c785c)

normanmaurer added a commit that referenced this pull request Dec 8, 2016
Motivation:

When profiling it is sometimes needed to still have the native library file avaible. We should allow to disable the explicit deletion and just delete it when the JVM stops.

This is related to #6110

Modifications:

Add io.netty.native.deleteLibAfterLoading system property which allows to disable the explicit delete after laoding

Result:

Possible to profile native libraries better.
normanmaurer added a commit that referenced this pull request Dec 16, 2016
Motivation:

When profiling it is sometimes needed to still have the native library file avaible. We should allow to disable the explicit deletion and just delete it when the JVM stops.

This is related to #6110

Modifications:

Add io.netty.native.deleteLibAfterLoading system property which allows to disable the explicit delete after laoding

Result:

Possible to profile native libraries better.
normanmaurer added a commit that referenced this pull request Dec 16, 2016
Motivation:

When profiling it is sometimes needed to still have the native library file avaible. We should allow to disable the explicit deletion and just delete it when the JVM stops.

This is related to #6110

Modifications:

Add io.netty.native.deleteLibAfterLoading system property which allows to disable the explicit delete after laoding

Result:

Possible to profile native libraries better.
liuzhengyang pushed a commit to liuzhengyang/netty that referenced this pull request Sep 10, 2017
Motivation:

When profiling it is sometimes needed to still have the native library file avaible. We should allow to disable the explicit deletion and just delete it when the JVM stops.

This is related to netty#6110

Modifications:

Add io.netty.native.deleteLibAfterLoading system property which allows to disable the explicit delete after laoding

Result:

Possible to profile native libraries better.
pulllock pushed a commit to pulllock/netty that referenced this pull request Oct 19, 2023
Motivation:

When profiling it is sometimes needed to still have the native library file avaible. We should allow to disable the explicit deletion and just delete it when the JVM stops.

This is related to netty#6110

Modifications:

Add io.netty.native.deleteLibAfterLoading system property which allows to disable the explicit delete after laoding

Result:

Possible to profile native libraries better.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants