[svn-r25954] HDFFV-9046: reorganize hdf5/perform, step 2

Last changes had caused problems with Windows platform:
1. H5private.h in io_timer.h is not accessible in the distributed shared library of tools.
   Need to move it to io_timer.c.
2. debug_start_stop_time() would not be available outside of h5perf. Some favor of compiler
   does not like it.  Screened it out for now.
3. mere "extern" is not good enough for Windows shared library. Must mark them as DLL. Need to mark them as 
   "H5TOOLS_DLL".
4. STANDALONE mode is broken. Screened out the code for now.

Tested; h5committest.
This commit is contained in:
Albert Cheng 2015-01-05 16:47:34 -05:00
parent 671006a10d
commit 6a982a7690
2 changed files with 13 additions and 7 deletions

View File

@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "H5private.h"
#include "hdf5.h"
#ifdef H5_HAVE_PARALLEL
@ -73,7 +74,7 @@ static double sub_time(struct timeval* a, struct timeval* b)
io_time_t *
io_time_new(clock_type type)
{
io_time_t *pt = (io_time_t *)calloc(1, sizeof(struct io_time_t));
io_time_t *pt = (io_time_t *)HDcalloc(1, sizeof(struct io_time_t));
/* set global timer variable */
timer_g = pt;
@ -197,12 +198,15 @@ set_time(io_time_t *pt, timer_type t, int start_stop)
}
break;
default:
fprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type);
return (NULL);
break;
}
#if 0
/* this does not belong here. Need fix in h5perf code when set_time() is called. -AKC- */
debug_start_stop_time(pt, t, start_stop);
#endif
return pt;
}
@ -220,6 +224,9 @@ get_time(io_time_t *pt, timer_type t)
return pt->total_time[t];
}
#if 0
/* standalone is not working yet. Need fix later. -AKC- */
#ifdef STANDALONE
#include "pio_standalone.c"
#endif
#endif

View File

@ -17,7 +17,6 @@
#define IO_TIMER__
#include "hdf5.h"
#include "H5private.h"
#if defined(H5_TIME_WITH_SYS_TIME)
# include <sys/time.h>
@ -73,10 +72,10 @@ typedef struct io_time_t {
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
extern io_time_t *io_time_new(clock_type t);
extern void io_time_destroy(io_time_t *pt);
extern io_time_t *set_time(io_time_t *pt, timer_type t, int start_stop);
extern double get_time(io_time_t *pt, timer_type t);
H5TOOLS_DLL io_time_t *io_time_new(clock_type t);
H5TOOLS_DLL void io_time_destroy(io_time_t *pt);
H5TOOLS_DLL io_time_t *set_time(io_time_t *pt, timer_type t, int start_stop);
H5TOOLS_DLL double get_time(io_time_t *pt, timer_type t);
#ifdef __cplusplus
}
#endif /* __cplusplus */