2 #include "porting_abstraction_layer.h"
3 #include "porting_abstraction_layer_operating_system.h"
7 #include "../../../liblfds710/inc/liblfds710.h"
8 #include "../../libbenchmark/inc/libbenchmark.h"
9 #include "util_cmdline.h"
15 #define BITS_PER_BYTE 8
19 #define BENCHMARK_VERSION_STRING "7.1.0"
20 #define BENCHMARK_VERSION_INTEGER 710
22 #if( defined KERNEL_MODE )
23 #define MODE_TYPE_STRING "kernel-mode"
26 #if( !defined KERNEL_MODE )
27 #define MODE_TYPE_STRING "user-mode"
30 #if( defined NDEBUG && !defined COVERAGE && !defined TSAN && !defined PROF )
31 #define BUILD_TYPE_STRING "release"
34 #if( !defined NDEBUG && !defined COVERAGE && !defined TSAN && !defined PROF )
35 #define BUILD_TYPE_STRING "debug"
38 #if( !defined NDEBUG && defined COVERAGE && !defined TSAN && !defined PROF )
39 #define BUILD_TYPE_STRING "coverage"
42 #if( !defined NDEBUG && !defined COVERAGE && defined TSAN && !defined PROF )
43 #define BUILD_TYPE_STRING "threadsanitizer"
46 #if( !defined NDEBUG && !defined COVERAGE && !defined TSAN && defined PROF )
47 #define BUILD_TYPE_STRING "profiling"
50 #define ONE_KILOBYTES_IN_BYTES 1024
51 #define ONE_MEGABYTE_IN_BYTES (ONE_KILOBYTES_IN_BYTES * 1024)
52 #define BENCHMARK_DEFAULT_MEMORY_IN_MEGABYTES 64
60 /***** prototypes *****/
61 int main( int argc, char **argv );
62 void internal_show_version( void );
63 void callback_stdout( char *string );
65 void *benchmark_pal_numa_malloc( lfds710_pal_uint_t numa_node_id, lfds710_pal_uint_t size_in_bytes );
66 void benchmark_pal_numa_free( void *memory, lfds710_pal_uint_t size_in_bytes );