mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-21 16:12:47 -05:00
APS5_ENABLE_TRACY=ON builds the Tracy 0.14.1 client from the new 3rdparty/tracy submodule as a shared library next to the patched libraries. Every PerformanceTimer scope of libSceAgcDriver and libSceVideoOut becomes a Tracy zone, each presented flip ends a frame, and the queue workers and the presenter name their threads. The client listens only on localhost and records only while a profiler is connected; sampling, system tracing, call stacks, code transfer and its crash handler are off. Without the option nothing of Tracy is compiled. On MinGW the client is built without thread_local destructors and with TRACY_DELAYED_INIT, because emulated TLS frees thread_local objects before their destructors run; a thread's event producer then stays alive until the process exits instead of being destroyed on freed memory.
22 lines
1.1 KiB
CMake
22 lines
1.1 KiB
CMake
set(TRACY_ENABLE ON CACHE BOOL "" FORCE)
|
|
set(TRACY_STATIC OFF CACHE BOOL "" FORCE)
|
|
set(TRACY_ON_DEMAND ON CACHE BOOL "" FORCE)
|
|
set(TRACY_ONLY_LOCALHOST ON CACHE BOOL "" FORCE)
|
|
set(TRACY_NO_CRASH_HANDLER ON CACHE BOOL "" FORCE)
|
|
set(TRACY_NO_CODE_TRANSFER ON CACHE BOOL "" FORCE)
|
|
set(TRACY_NO_SAMPLING ON CACHE BOOL "" FORCE)
|
|
set(TRACY_NO_SYSTEM_TRACING ON CACHE BOOL "" FORCE)
|
|
set(TRACY_NO_CALLSTACK ON CACHE BOOL "" FORCE)
|
|
set(TRACY_NO_FRAME_IMAGE ON CACHE BOOL "" FORCE)
|
|
set(TRACY_NO_VERIFY ON CACHE BOOL "" FORCE)
|
|
set(CMAKE_DISABLE_FIND_PACKAGE_rocprofiler-sdk ON)
|
|
add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/tracy ${CMAKE_BINARY_DIR}/3rdparty/tracy EXCLUDE_FROM_ALL)
|
|
|
|
if(MINGW)
|
|
target_sources(TracyClient PRIVATE ${CMAKE_CURRENT_LIST_DIR}/TracyThreadExit.cpp)
|
|
target_compile_definitions(TracyClient PRIVATE TRACY_DELAYED_INIT)
|
|
get_target_property(tracyInterfaceDefinitions TracyClient INTERFACE_COMPILE_DEFINITIONS)
|
|
list(FILTER tracyInterfaceDefinitions EXCLUDE REGEX "^(WINVER|_WIN32_WINNT)=")
|
|
set_target_properties(TracyClient PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${tracyInterfaceDefinitions}")
|
|
endif()
|