Date: Mon, 11 Jun 2012 11:59:51 +0000 From: gmiller@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r237458 - in soc2012/gmiller/locking-head: include lib/libthr/thread Message-ID: <20120611115951.51EE810657E9@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gmiller Date: Mon Jun 11 11:59:50 2012 New Revision: 237458 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237458 Log: Add pthread_getstatistics_*_np() functions and a pthread_statistics_np struct to retrieve profiling stats. Modified: soc2012/gmiller/locking-head/include/pthread_np.h soc2012/gmiller/locking-head/lib/libthr/thread/thr_profile.c Modified: soc2012/gmiller/locking-head/include/pthread_np.h ============================================================================== --- soc2012/gmiller/locking-head/include/pthread_np.h Mon Jun 11 11:41:32 2012 (r237457) +++ soc2012/gmiller/locking-head/include/pthread_np.h Mon Jun 11 11:59:50 2012 (r237458) @@ -68,6 +68,19 @@ int pthread_switch_add_np(pthread_switch_routine_t); int pthread_switch_delete_np(pthread_switch_routine_t); int pthread_timedjoin_np(pthread_t, void **, const struct timespec *); + +#ifdef LOCK_PROFILING + +struct pthread_statistics_np { +}; + +void pthread_getstatistics_begin_np(struct pthread_statistics_np *, + size_t record_size); +void pthread_getstatistics_next_np(struct pthread_statistics_np *); +void pthread_getstatistics_end_np(struct pthread_statistics_np *); + +#endif + __END_DECLS #endif Modified: soc2012/gmiller/locking-head/lib/libthr/thread/thr_profile.c ============================================================================== --- soc2012/gmiller/locking-head/lib/libthr/thread/thr_profile.c Mon Jun 11 11:41:32 2012 (r237457) +++ soc2012/gmiller/locking-head/lib/libthr/thread/thr_profile.c Mon Jun 11 11:59:50 2012 (r237458) @@ -31,6 +31,7 @@ #include <time.h> #include <inttypes.h> #include <string.h> +#include <pthread_np.h> #include "thr_private.h" @@ -274,4 +275,20 @@ { } -#endif +void +pthread_getstatistics_begin_np(struct pthread_statistics_np *stats, + size_t record_size) +{ +} + +void +pthread_getstatistics_next_np(struct pthread_statistics_np *stats) +{ +} + +void +pthread_getstatistics_end_np(struct pthread_statistics_np *stats) +{ +} + +#endif /* LOCK_PROFILING */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120611115951.51EE810657E9>