Add a data region to the memory pool

Some records may need to point to data with the same lifetime as the
records themselves. One solution is to store the data at the end of
the memory pool buffer. Records in the buffer grow up, and the data
grows down. When the buffer is flushed both records and data are
recycled.

Change-Id: I278fa84478236bf895f7c2d152d47d4256987392
This commit is contained in:
Laurent Morichetti
2022-05-25 20:57:57 -07:00
committad av Laurent Morichetti
förälder 4c6f249cc1
incheckning ef3b2a8aa8
5 ändrade filer med 213 tillägg och 41 borttagningar
+12 -6
Visa fil
@@ -80,12 +80,6 @@ target_include_directories(codeobj_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${PR
target_link_libraries(codeobj_test roctracer)
add_dependencies(mytest codeobj_test)
## Build the trace_buffer test
add_executable(trace_buffer EXCLUDE_FROM_ALL directed/trace_buffer.cpp)
target_include_directories(trace_buffer PRIVATE ${PROJECT_SOURCE_DIR}/src/tracer_tool)
target_link_libraries(trace_buffer Threads::Threads atomic)
add_dependencies(mytest trace_buffer)
## Build the hsa (standalone) copy test
function(generate_hsaco TARGET_ID INPUT_FILE OUTPUT_FILE)
separate_arguments(CLANG_ARG_LIST UNIX_COMMAND
@@ -126,6 +120,18 @@ add_executable(load_unload_reload_test EXCLUDE_FROM_ALL hsa/load_unload_reload.c
target_link_libraries(load_unload_reload_test hsa-runtime64::hsa-runtime64)
add_dependencies(mytest load_unload_reload_test)
## Build the trace_buffer test
add_executable(trace_buffer EXCLUDE_FROM_ALL directed/trace_buffer.cpp)
target_include_directories(trace_buffer PRIVATE ${PROJECT_SOURCE_DIR}/src/tracer_tool)
target_link_libraries(trace_buffer Threads::Threads atomic)
add_dependencies(mytest trace_buffer)
## Build the memory_pool test
add_executable(memory_pool EXCLUDE_FROM_ALL directed/memory_pool.cpp)
target_include_directories(memory_pool PRIVATE ${PROJECT_SOURCE_DIR}/src/roctracer ${PROJECT_SOURCE_DIR}/inc)
target_link_libraries(memory_pool Threads::Threads atomic)
add_dependencies(mytest memory_pool)
## Copy the golden traces and test scripts
configure_file(run.sh ${PROJECT_BINARY_DIR} COPYONLY)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink run.sh ${PROJECT_BINARY_DIR}/run_ci.sh)