-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ceph#15055 from mogeb/wip-with-instrument-functions
cmake: Add -finstrument-functions flag to OSD code Reviewed-by: Kefu Chai <[email protected]>
- Loading branch information
Showing
11 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#define TRACEPOINT_CREATE_PROBES | ||
/* | ||
* The header containing our TRACEPOINT_EVENTs. | ||
*/ | ||
#include "tracing/cyg_profile.h" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "include/int_types.h" | ||
|
||
TRACEPOINT_EVENT(lttng_ust_cyg_profile, func_entry, | ||
TP_ARGS( | ||
void *, func_addr, | ||
void *, call_site), | ||
TP_FIELDS( | ||
ctf_integer_hex(unsigned long, addr, func_addr) | ||
ctf_integer_hex(unsigned long, call_site, call_site) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT(lttng_ust_cyg_profile, func_exit, | ||
TP_ARGS( | ||
void *, func_addr, | ||
void *, call_site | ||
), | ||
TP_FIELDS( | ||
ctf_integer_hex(unsigned long, addr, func_addr) | ||
ctf_integer_hex(unsigned long, call_site, call_site) | ||
) | ||
) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "acconfig.h" | ||
|
||
#ifdef WITH_LTTNG | ||
#define TRACEPOINT_DEFINE | ||
#define TRACEPOINT_PROBE_DYNAMIC_LINKAGE | ||
#include "tracing/cyg_profile.h" | ||
#undef TRACEPOINT_PROBE_DYNAMIC_LINKAGE | ||
#undef TRACEPOINT_DEFINE | ||
#endif | ||
|
||
void __cyg_profile_func_enter(void *this_fn, void *call_site) | ||
__attribute__((no_instrument_function)); | ||
|
||
void __cyg_profile_func_exit(void *this_fn, void *call_site) | ||
__attribute__((no_instrument_function)); | ||
|
||
|
||
void __cyg_profile_func_enter(void *this_fn, void *call_site) | ||
{ | ||
#ifdef WITH_LTTNG | ||
tracepoint(lttng_ust_cyg_profile, func_entry, this_fn, call_site); | ||
#endif | ||
} | ||
|
||
void __cyg_profile_func_exit(void *this_fn, void *call_site) | ||
{ | ||
#ifdef WITH_LTTNG | ||
tracepoint(lttng_ust_cyg_profile, func_exit, this_fn, call_site); | ||
#endif | ||
} | ||
|