Comments (13)
@egor-ryashin Could you please open a separate issue?
from async-profiler.
You can dynamically inject agent library into the running JVM using HotSpot Attach API.
For instance, you can do this with my jattach utility:
jattach PID load /path/to/libasyncProfiler.so true start
jattach PID load /path/to/libasyncProfiler.so true stop
from async-profiler.
@apangin I've followed this and it just prints
Connected to remote JVM
Response Code = -1
from async-profiler.
This means the command was recognized, but the library could not be loaded.
Make sure you specify the absolute path to the library, and the file has proper permissions.
from async-profiler.
I'm trying to attach and dump summary info:
$ ./jattach $PID load /tmp/libasyncProfiler.so true start 1 10 Connected to remote JVM Response code = 0 0 $ ./jattach $PID load /tmp/libasyncProfiler.so true dumpRawTraces Connected to remote JVM Response code = 0 0 $ ./jattach $PID load /tmp/libasyncProfiler.so true stop Connected to remote JVM Response code = 0 0 $ ./jattach $PID load /tmp/libasyncProfiler.so true dumpRawTraces Connected to remote JVM Response code = 0 0
but I can't get any methods info. What am I doing wrong?
from async-profiler.
Note that profiling stats are printed on stdout
of Java process (not on the console of jattach).
from async-profiler.
Alternatively you may dump raw traces to the specified file:
./jattach $PID load /tmp/libasyncProfiler.so true dumpRawTraces:/path/to/profile.txt
from async-profiler.
Thanks. With dumpRawTraces method it's working fine. But with other methods - summary, dumpMethods and others it doesn't work - no file created.
from async-profiler.
Hi again! Could you please get any advice how to get summary/dumpMethods info in file?
from async-profiler.
This is not supported right now, but will get fixed soon.
from async-profiler.
@tartemov you can use Brendan Gregg scripts to fold stacks and make svg
-
FlameGraph/stackcollapse-ljp.awk mytrace.txt > mytrace.folded
-
FlameGraph/flamegraph.pl mytrace.folded > mytrace.svg
from async-profiler.
Resolved by #13
from async-profiler.
I cannot attach to some JVM processes.
I made profiler.sh output more info:
collect)
$JATTACH $PID load $PROFILER true start,file=$FILE$INTERVAL$FRAMEBUF #> /dev/null
if [ $? -ne 0 ]; then
exit 1
fi
Got this:
~/async-profiler $ sudo -u xncore ./profiler.sh -d 10 3515
Connected to remote JVM
Response code = -1
Is there a way to debug it further?
from async-profiler.
Related Issues (20)
- Unsupported event type when trying to trace with a tracepoint HOT 2
- Large number of `no_Java_frame` entries in the flame graph HOT 14
- JVM crash with frame Profiler::recordSample HOT 1
- Binary converter
- Flame Graph: alt+click to remove stacks
- JVM crash with frame Profiler::getJavaTraceAsync
- JVM crash with frame Profiler::getJavaTraceAsync HOT 2
- In TLAB allocation sizes rounded up HOT 2
- Could not set dlopen hook. Unsupported JVM? seems libjvm.dylib lack of 'Section __la_symbol_ptr': HOT 4
- Help interpreting snapshot HOT 2
- Converter enhancements
- off cpu profiling HOT 7
- async-profiler not working with alpine based containers running on graviton instances HOT 2
- Failed to inject profiler into <PID> HOT 3
- Comparing two profiles HOT 1
- Add Java-API as output option for wall-clock profiling HOT 11
- `-agentpath` mode consumes more code cache memory HOT 4
- Segmentation fault on Azul Zing HOT 6
- [WARN] Unknown argument: cpu HOT 3
- Introduce filtering by CPU HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async-profiler.