-
Notifications
You must be signed in to change notification settings - Fork 7.2k
[tracy] update to 0.13 #48506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
fran6co
wants to merge
1
commit into
microsoft:master
Choose a base branch
from
fran6co:fran/tracy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[tracy] update to 0.13 #48506
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
| index 740b484..e4397a4 100644 | ||
| --- a/src/CMakeLists.txt | ||
| +++ b/src/CMakeLists.txt | ||
| @@ -128,6 +128,14 @@ set_target_properties(${TARGET_NAME} PROPERTIES | ||
|
|
||
| if (NFD_INSTALL) | ||
| include(GNUInstallDirs) | ||
| + include(CMakePackageConfigHelpers) | ||
| + | ||
| + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-config-version.cmake" | ||
| + VERSION "${PROJECT_VERSION}" | ||
| + COMPATIBILITY SameMajorVersion | ||
| + ) | ||
| + | ||
| + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-config-version.cmake" DESTINATION lib/cmake/${TARGET_NAME}) | ||
|
|
||
| install(TARGETS ${TARGET_NAME} EXPORT ${TARGET_NAME}-export | ||
| LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 8efec25..6007610 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -700,4 +700,13 @@ install(FILES | ||
| DESTINATION "${LIB_INSTALL_DIR}/pkgconfig" | ||
| ) | ||
|
|
||
| + | ||
| +include(CMakePackageConfigHelpers) | ||
| + | ||
| +write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-tidy-html5Config-version.cmake" | ||
| + VERSION "${LIBTIDY_VERSION}" | ||
| + COMPATIBILITY SameMajorVersion | ||
| +) | ||
| + | ||
| +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-tidy-html5Config-version.cmake DESTINATION ${LIB_INSTALL_DIR}/cmake/unofficial-tidy-html5) | ||
| # eof |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt | ||
| index d01731d3..1d36eee1 100644 | ||
| --- a/profiler/CMakeLists.txt | ||
| +++ b/profiler/CMakeLists.txt | ||
| @@ -266,7 +266,7 @@ if(NOT DEFINED GIT_REV) | ||
| endif() | ||
|
|
||
| find_package(Git) | ||
| -if(Git_FOUND) | ||
| +if(0) | ||
|
Comment on lines
+8
to
+10
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Drop the patch. Configure with |
||
| add_custom_target(git-ref | ||
| COMMAND ${CMAKE_COMMAND} -E echo "#pragma once" > GitRef.hpp.tmp | ||
| COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR} log -1 "--format=namespace tracy { static inline const char* GitRef = %x22%h%x22; }" ${GIT_REV} >> GitRef.hpp.tmp || echo "namespace tracy { static inline const char* GitRef = \"unknown\"; }" >> GitRef.hpp.tmp | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp | ||
| index c79948b8..7bd717b7 100644 | ||
| --- a/profiler/src/profiler/TracySourceView.cpp | ||
| +++ b/profiler/src/profiler/TracySourceView.cpp | ||
| @@ -713,7 +713,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker ) | ||
| rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle ); | ||
| break; | ||
| case CpuArchArm64: | ||
| - rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle ); | ||
| + rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle ); | ||
| break; | ||
| default: | ||
| assert( false ); | ||
| @@ -778,9 +778,9 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker ) | ||
| } | ||
| break; | ||
| case CpuArchArm64: | ||
| - if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM ) | ||
| + if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM ) | ||
| { | ||
| - jumpAddr = (uint64_t)detail.aarch64.operands[0].imm; | ||
| + jumpAddr = (uint64_t)detail.arm64.operands[0].imm; | ||
| } | ||
| break; | ||
| default: | ||
| @@ -865,18 +865,18 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker ) | ||
| } | ||
| break; | ||
| case CpuArchArm64: | ||
| - for( uint8_t i=0; i<detail.aarch64.op_count; i++ ) | ||
| + for( uint8_t i=0; i<detail.arm64.op_count; i++ ) | ||
| { | ||
| uint8_t type = 0; | ||
| - switch( detail.aarch64.operands[i].type ) | ||
| + switch( detail.arm64.operands[i].type ) | ||
| { | ||
| - case AARCH64_OP_IMM: | ||
| + case ARM64_OP_IMM: | ||
| type = 0; | ||
| break; | ||
| - case AARCH64_OP_REG: | ||
| + case ARM64_OP_REG: | ||
| type = 1; | ||
| break; | ||
| - case AARCH64_OP_MEM: | ||
| + case ARM64_OP_MEM: | ||
| type = 2; | ||
| break; | ||
| default: | ||
| diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp | ||
| index b1dffe1a..cb1e179f 100644 | ||
| --- a/server/TracyWorker.cpp | ||
| +++ b/server/TracyWorker.cpp | ||
| @@ -3912,7 +3912,7 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz ) | ||
| rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle ); | ||
| break; | ||
| case CpuArchArm64: | ||
| - rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle ); | ||
| + rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle ); | ||
| break; | ||
| default: | ||
| assert( false ); | ||
| @@ -3952,9 +3952,9 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz ) | ||
| } | ||
| break; | ||
| case CpuArchArm64: | ||
| - if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM ) | ||
| + if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM ) | ||
| { | ||
| - callAddr = (uint64_t)detail.aarch64.operands[0].imm; | ||
| + callAddr = (uint64_t)detail.arm64.operands[0].imm; | ||
| } | ||
| break; | ||
| default: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| diff --git a/cmake/server.cmake b/cmake/server.cmake | ||
| index a76d1c13..d8c1a26f 100644 | ||
| --- a/cmake/server.cmake | ||
| +++ b/cmake/server.cmake | ||
| @@ -29,7 +29,7 @@ list(TRANSFORM TRACY_SERVER_SOURCES PREPEND "${TRACY_SERVER_DIR}/") | ||
|
|
||
| add_library(TracyServer STATIC EXCLUDE_FROM_ALL ${TRACY_COMMON_SOURCES} ${TRACY_SERVER_SOURCES}) | ||
| target_include_directories(TracyServer PUBLIC ${TRACY_COMMON_DIR} ${TRACY_SERVER_DIR}) | ||
| -target_link_libraries(TracyServer PUBLIC TracyCapstone libzstd PPQSort::PPQSort) | ||
| +target_link_libraries(TracyServer PUBLIC TracyCapstone zstd::libzstd PPQSort::PPQSort) | ||
| if(NO_STATISTICS) | ||
| target_compile_definitions(TracyServer PUBLIC TRACY_NO_STATISTICS) | ||
| endif() | ||
| diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake | ||
| index a54f7c53..73b16592 100644 | ||
| --- a/cmake/vendor.cmake | ||
| +++ b/cmake/vendor.cmake | ||
| @@ -136,6 +136,7 @@ target_include_directories(TracyGetOpt PUBLIC ${GETOPT_DIR}) | ||
| CPMAddPackage( | ||
| NAME ImGui | ||
| GITHUB_REPOSITORY ocornut/imgui | ||
| + FORCE TRUE | ||
| GIT_TAG v1.92.1-docking | ||
| DOWNLOAD_ONLY TRUE | ||
| PATCHES | ||
| @@ -153,6 +154,9 @@ set(IMGUI_SOURCES | ||
| backends/imgui_impl_opengl3.cpp | ||
| ) | ||
|
|
||
| +# Make ImGui_SOURCE_DIR available to the parent scope | ||
| +set(ImGui_SOURCE_DIR "${ImGui_SOURCE_DIR}" PARENT_SCOPE) | ||
| + | ||
| list(TRANSFORM IMGUI_SOURCES PREPEND "${ImGui_SOURCE_DIR}/") | ||
|
|
||
| add_library(TracyImGui STATIC EXCLUDE_FROM_ALL ${IMGUI_SOURCES}) | ||
| @@ -198,7 +202,7 @@ CPMAddPackage( | ||
| # json | ||
|
|
||
| CPMAddPackage( | ||
| - NAME json | ||
| + NAME nlohmann_json | ||
| GITHUB_REPOSITORY nlohmann/json | ||
| GIT_TAG v3.12.0 | ||
| EXCLUDE_FROM_ALL TRUE | ||
| @@ -233,7 +237,7 @@ if(NOT EMSCRIPTEN) | ||
| # tidy | ||
|
|
||
| CPMAddPackage( | ||
| - NAME tidy | ||
| + NAME unofficial-tidy-html5 | ||
| GITHUB_REPOSITORY htacg/tidy-html5 | ||
| GIT_TAG 5.8.0 | ||
| PATCHES | ||
| @@ -293,4 +297,4 @@ if(NOT EMSCRIPTEN) | ||
| target_include_directories(TracyLibcurl INTERFACE ${libcurl_SOURCE_DIR}/include) | ||
| endif() | ||
|
|
||
| -endif() | ||
| \ No newline at end of file | ||
| +endif() | ||
| diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt | ||
| index d01731d3..9c07e971 100644 | ||
| --- a/profiler/CMakeLists.txt | ||
| +++ b/profiler/CMakeLists.txt | ||
| @@ -242,7 +242,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE | ||
| TracyImGui | ||
| Threads::Threads | ||
| nlohmann_json::nlohmann_json | ||
| - md4c | ||
| + md4c::md4c | ||
| ) | ||
| target_include_directories(${PROJECT_NAME} PRIVATE | ||
| ${tidy_SOURCE_DIR}/include | ||
| @@ -254,8 +254,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE | ||
| if(NOT EMSCRIPTEN) | ||
| target_link_libraries(${PROJECT_NAME} PRIVATE | ||
| TracyLibcurl | ||
| - base64 | ||
| - tidy-static | ||
| + aklomp::base64 | ||
| + unofficial::tidy-html5::tidy | ||
| TracyPugixml | ||
| usearch | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be submitted upstream instead? They choose their compatibility policy. A vcpkg-only version capability is pointless lock-in.