summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2013-10-07 22:04:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2013-10-07 22:04:27 (GMT)
commit3a96de8b17df2964f4ad7da5c9742b3bd71b3c38 (patch)
tree93e44fbe16b9b6227fb28f7f415939a1e1602237 /src/H5private.h
parent307f88870c18d050912cb7bb614480420a794a9c (diff)
downloadhdf5-3a96de8b17df2964f4ad7da5c9742b3bd71b3c38.zip
hdf5-3a96de8b17df2964f4ad7da5c9742b3bd71b3c38.tar.gz
hdf5-3a96de8b17df2964f4ad7da5c9742b3bd71b3c38.tar.bz2
[svn-r24262] Description:
Bring r24256 & r24261 from trunk to 1.8 branch: Switch H5I internal data structure from using hash table to skip lists. Also, a few misc. cleanups. Tested on: FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.11 (emu) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, w/threadsafe, in production mode Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/H5private.h b/src/H5private.h
index f828a46..ac4574f 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -210,10 +210,11 @@
*/
#define eventa(func_name) h5_mpe_eventa
#define eventb(func_name) h5_mpe_eventb
-#define MPE_LOG_VARS \
- static int eventa(FUNC) = -1; \
- static int eventb(FUNC) = -1; \
- const char* p_event_start = "start" FUNC;
+#define MPE_LOG_VARS \
+ static int h5_mpe_eventa = -1; \
+ static int h5_mpe_eventb = -1; \
+ static char p_event_start[128]; \
+ static char p_event_end[128];
/* Hardwire the color to "red", since that's what all the routines are using
* now. In the future, if we want to change that color for a given routine,
@@ -222,15 +223,18 @@
* color information down to the BEGIN_MPE_LOG macro (which should have a new
* BEGIN_MPE_LOG_COLOR variant). -QAK
*/
-#define BEGIN_MPE_LOG \
- if (H5_MPEinit_g){ \
- if (eventa(FUNC) == -1 && eventb(FUNC) == -1) { \
- const char* p_color = "red"; \
- eventa(FUNC)=MPE_Log_get_event_number(); \
- eventb(FUNC)=MPE_Log_get_event_number(); \
- MPE_Describe_state(eventa(FUNC), eventb(FUNC), (char *)FUNC, (char *)p_color); \
- } \
- MPE_Log_event(eventa(FUNC), 0, (char *)p_event_start); \
+#define BEGIN_MPE_LOG \
+ if(H5_MPEinit_g) { \
+ if(h5_mpe_eventa == -1 && h5_mpe_eventb == -1) { \
+ const char *p_color = "red"; \
+ \
+ h5_mpe_eventa = MPE_Log_get_event_number(); \
+ h5_mpe_eventb = MPE_Log_get_event_number(); \
+ HDsnprintf(p_event_start, sizeof(p_event_start) - 1, "start_%s", FUNC); \
+ HDsnprintf(p_event_end, sizeof(p_event_end) - 1, "end_%s", FUNC); \
+ MPE_Describe_state(h5_mpe_eventa, h5_mpe_eventb, (char *)FUNC, (char *)p_color); \
+ } \
+ MPE_Log_event(h5_mpe_eventa, 0, p_event_start); \
}
@@ -240,9 +244,9 @@
*
* Programmer: Long Wang
*/
-#define FINISH_MPE_LOG \
- if (H5_MPEinit_g) { \
- MPE_Log_event(eventb(FUNC), 0, (char *)FUNC); \
+#define FINISH_MPE_LOG \
+ if(H5_MPEinit_g) { \
+ MPE_Log_event(h5_mpe_eventb, 0, p_event_end); \
}
#else /* H5_HAVE_MPE */