Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeout in native mode does not work #840

Closed
abextm opened this issue Nov 11, 2023 · 2 comments
Closed

timeout in native mode does not work #840

abextm opened this issue Nov 11, 2023 · 2 comments
Labels

Comments

@abextm
Copy link

abextm commented Nov 11, 2023

Using 6ab9f83
Running LD_PRELOAD=libasyncProfiler.so ASPROF_COMMAND="start,event=cpu,file=test.html,timeout=5" glxgears doesn't ever write test.html.
This is because the timer thread uses _agent_args instead of _preload_args, regardless of what actually started the Profiler. Making everything use a single Arguments instance seems to work correctly.

@apangin
Copy link
Collaborator

apangin commented Nov 21, 2023

Thanks, the problem is understood. I'll see how to fix it.

As a workaround, you may use jfr output format (i.e. replace file=test.html with file=test.jfr). In this case, profiler will correctly stop and dump results after the given timeout. You may then use converter.jar to convert jfr to a flame graph.

@apangin apangin added the bug label Nov 21, 2023
apangin added a commit that referenced this issue Nov 24, 2023
@apangin
Copy link
Collaborator

apangin commented Nov 24, 2023

Added support for loop and timeout options in all modes.

@apangin apangin closed this as completed Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants