diff options
| author | Quentin Young <qlyoung@nvidia.com> | 2020-09-15 00:28:55 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@nvidia.com> | 2020-10-23 15:13:51 -0400 |
| commit | 87879a5ecb0d31e490ce078adaf4408476bd4df8 (patch) | |
| tree | 685a1b6693fcba0293516893828a3b4ced498be7 /lib/frr_pthread.c | |
| parent | 1bd1ebaa08e9ca2e120f31fb9db3bd6be8111989 (diff) | |
lib: add tracepoints for pthread run, stop
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/frr_pthread.c')
| -rw-r--r-- | lib/frr_pthread.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index da9594ed80..82d0c8c49f 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -28,6 +28,7 @@ #include "memory.h" #include "linklist.h" #include "zlog.h" +#include "trace.h" DEFINE_MTYPE_STATIC(LIB, FRR_PTHREAD, "FRR POSIX Thread") DEFINE_MTYPE_STATIC(LIB, PTHREAD_PRIM, "POSIX sync primitives") @@ -167,6 +168,8 @@ int frr_pthread_run(struct frr_pthread *fpt, const pthread_attr_t *attr) sigfillset(&blocksigs); pthread_sigmask(SIG_BLOCK, &blocksigs, &oldsigs); + tracepoint(frr_libfrr, frr_pthread_run, fpt->name); + fpt->rcu_thread = rcu_thread_prepare(); ret = pthread_create(&fpt->thread, attr, frr_pthread_inner, fpt); @@ -204,6 +207,8 @@ void frr_pthread_notify_running(struct frr_pthread *fpt) int frr_pthread_stop(struct frr_pthread *fpt, void **result) { + tracepoint(frr_libfrr, frr_pthread_stop, fpt->name); + int ret = (*fpt->attr.stop)(fpt, result); memset(&fpt->thread, 0x00, sizeof(fpt->thread)); return ret; |
