зеркало из https://github.com/microsoft/snmalloc.git
Add a cache-friendly version of the tests.
This only tests CACHE_FRIENDLY_OFFSET=64, which is probably what we'll be using in the end.
This commit is contained in:
Родитель
4ac3421487
Коммит
66400af419
|
@ -79,20 +79,29 @@ enable_testing()
|
|||
|
||||
set(TESTDIR ${CMAKE_CURRENT_SOURCE_DIR}/src/test)
|
||||
subdirlist(TEST_CATEGORIES ${TESTDIR})
|
||||
foreach(SUPER_SLAB_SIZE 1;16)
|
||||
foreach(TEST_CATEGORY ${TEST_CATEGORIES})
|
||||
subdirlist(TESTS ${TESTDIR}/${TEST_CATEGORY})
|
||||
foreach(TEST ${TESTS})
|
||||
unset(SRC)
|
||||
aux_source_directory(${TESTDIR}/${TEST_CATEGORY}/${TEST} SRC)
|
||||
set(TESTNAME "${TEST_CATEGORY}-${TEST}-${SUPER_SLAB_SIZE}")
|
||||
add_executable(${TESTNAME} ${SRC} src/override/new.cc)
|
||||
if (${SUPER_SLAB_SIZE} EQUAL 1)
|
||||
target_compile_definitions(${TESTNAME} PRIVATE IS_ADDRESS_SPACE_CONSTRAINED)
|
||||
endif()
|
||||
target_include_directories(${TESTNAME} PRIVATE src)
|
||||
linklibs(${TESTNAME})
|
||||
add_test(${TESTNAME} ${TESTNAME})
|
||||
foreach(TEST_CACHE_FRIENDLY_OFFSET OFF;ON)
|
||||
foreach(SUPER_SLAB_SIZE 1;16)
|
||||
foreach(TEST_CATEGORY ${TEST_CATEGORIES})
|
||||
subdirlist(TESTS ${TESTDIR}/${TEST_CATEGORY})
|
||||
foreach(TEST ${TESTS})
|
||||
unset(SRC)
|
||||
aux_source_directory(${TESTDIR}/${TEST_CATEGORY}/${TEST} SRC)
|
||||
set(TESTNAME "${TEST_CATEGORY}-${TEST}-${SUPER_SLAB_SIZE}")
|
||||
if (TEST_CACHE_FRIENDLY_OFFSET)
|
||||
set(TESTNAME "${TESTNAME}-cache-friendly")
|
||||
endif()
|
||||
|
||||
add_executable(${TESTNAME} ${SRC} src/override/new.cc)
|
||||
if (${SUPER_SLAB_SIZE} EQUAL 1)
|
||||
target_compile_definitions(${TESTNAME} PRIVATE IS_ADDRESS_SPACE_CONSTRAINED)
|
||||
endif()
|
||||
if(TEST_CACHE_FRIENDLY_OFFSET)
|
||||
target_compile_definitions(${TESTNAME} PRIVATE CACHE_FRIENDLY_OFFSET=64)
|
||||
endif()
|
||||
target_include_directories(${TESTNAME} PRIVATE src)
|
||||
linklibs(${TESTNAME})
|
||||
add_test(${TESTNAME} ${TESTNAME})
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
|
Загрузка…
Ссылка в новой задаче