From owner-svn-soc-all@FreeBSD.ORG Mon Jun 11 11:59:53 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 51EE810657E9 for ; Mon, 11 Jun 2012 11:59:51 +0000 (UTC) (envelope-from gmiller@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Mon, 11 Jun 2012 11:59:51 +0000 Date: Mon, 11 Jun 2012 11:59:51 +0000 From: gmiller@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120611115951.51EE810657E9@hub.freebsd.org> Cc: Subject: socsvn commit: r237458 - in soc2012/gmiller/locking-head: include lib/libthr/thread X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2012 11:59:53 -0000 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 #include #include +#include #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 */