-
Notifications
You must be signed in to change notification settings - Fork 13
Add thapi_start() and thapi_stop()
#454
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
Open
thilinarmtb
wants to merge
34
commits into
argonne-lcf:devel
Choose a base branch
from
thilinarmtb:thapi_on_and_off_v2
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
7169e5a to
8120018
Compare
This is done by adding `__attribute((constructor))__` to `thapi_stop()`. Added an autotools check to see if the compiler supports `__attribute((constructor))__`.
and install `thapi_profiler.h` header files to provied declarations of `thapi_start()` and `thapi_stop()`.
We need one which supports __attribute__((constructor)) in user code.
Also, minor refactoring in utils/Makefile.am.
8120018 to
7a184b7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I created
lttng_ust_toggleevent category and implementedthapi_start()andthapi_stop()(in a similar spirit to
cudaProfilerStart()etc.). The library which the user has to link against isnamed
libThapi.so.Usage of the API is as follows:
If
libThapi.sois linked,thapi_stop()is called automatically during the library load time using__attribute__((constructor)). I added a check inconfigure.acto check if the compiler supports__attribute__((constructor)).P.S: This feature requires
lttng-ust >= 2.12.8. Specifically, this fix.TODO
Respectlttng_ust_profiler_*lttng_ust_toggle_*events when calculating statisticsfilter.toggle.toggletobabeltracegraph