socsvn commit: r237458 - in soc2012/gmiller/locking-head: include
lib/libthr/thread
gmiller at FreeBSD.org
gmiller at FreeBSD.org
Mon Jun 11 11:59:53 UTC 2012
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 */
More information about the svn-soc-all
mailing list