-
Notifications
You must be signed in to change notification settings - Fork 173
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 #920 from albertxu216/develop
Proc_image:增加测试脚本及测试代码
- Loading branch information
Showing
6 changed files
with
658 additions
and
9 deletions.
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
257 changes: 257 additions & 0 deletions
257
eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/test/lock_tracepoint.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,257 @@ | ||
|
||
#undef LTTNG_UST_TRACEPOINT_PROVIDER | ||
#define LTTNG_UST_TRACEPOINT_PROVIDER lock_monitor | ||
|
||
#undef LTTNG_UST_TRACEPOINT_INCLUDE | ||
#define LTTNG_UST_TRACEPOINT_INCLUDE "/home/xhb/ospp/lock_tracepoint.h" | ||
|
||
#if !defined(LOCK_TRACEPOINT_H) || defined(LTTNG_UST_TRACEPOINT_HEADER_MULTI_READ) | ||
#define LOCK_TRACEPOINT_H | ||
|
||
#include <lttng/tracepoint.h> | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
mutex_lock_start, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
mutex_lock_acquired, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
mutex_lock_released, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
mutex_trylock_start, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
mutex_trylock_acquired, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
mutex_trylock_failed, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_rdlock_start, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_rdlock_acquired, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_rdlock_released, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_rdlock_failed, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_wrlock_start, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_wrlock_acquired, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_wrlock_released, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
rwlock_wrlock_failed, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
spinlock_lock_start, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
spinlock_lock_acquired, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
spinlock_lock_released, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
spinlock_trylock_start, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
spinlock_trylock_acquired, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
|
||
TRACEPOINT_EVENT( | ||
lock_monitor, | ||
spinlock_trylock_failed, | ||
TP_ARGS(int, thread_id, void*, lock_ptr, long long unsigned int, time), | ||
TP_FIELDS( | ||
ctf_integer(int, thread_id, thread_id) | ||
ctf_integer_hex(void*, lock_ptr, lock_ptr) | ||
ctf_integer(long long unsigned int, time, time) | ||
) | ||
) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, mutex_lock_start, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, mutex_lock_acquired, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, mutex_lock_released, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, mutex_trylock_start, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, mutex_trylock_acquired, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, mutex_trylock_failed, TRACE_DEBUG) | ||
|
||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_rdlock_start, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_rdlock_acquired, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_rdlock_released, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_rdlock_failed, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_wrlock_start, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_wrlock_acquired, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_wrlock_released, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, rwlock_wrlock_failed, TRACE_DEBUG) | ||
|
||
TRACEPOINT_LOGLEVEL(lock_monitor, spinlock_lock_start, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, spinlock_lock_acquired, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, spinlock_lock_released, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, spinlock_trylock_start, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, spinlock_trylock_acquired, TRACE_DEBUG) | ||
TRACEPOINT_LOGLEVEL(lock_monitor, spinlock_trylock_failed, TRACE_DEBUG) | ||
|
||
|
||
#endif /* LOCK_TRACEPOINT_H */ | ||
|
||
#include <lttng/tracepoint-event.h> |
Oops, something went wrong.