From 06b0521c437d5b8b26934226b0fd0beb048dbecd Mon Sep 17 00:00:00 2001 From: Francisco Facioni Date: Mon, 27 Feb 2023 21:27:54 +0100 Subject: [PATCH] tracy - add disable-crash-handler to disable the crash handler (#29693) --- ports/tracy/004-fix-crash-handler.patch | 22 ++++++++++++++++++++++ ports/tracy/portfile.cmake | 6 +++++- ports/tracy/vcpkg.json | 8 +++++++- versions/baseline.json | 2 +- versions/t-/tracy.json | 5 +++++ 5 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 ports/tracy/004-fix-crash-handler.patch diff --git a/ports/tracy/004-fix-crash-handler.patch b/ports/tracy/004-fix-crash-handler.patch new file mode 100644 index 0000000000..cbfd57a59b --- /dev/null +++ b/ports/tracy/004-fix-crash-handler.patch @@ -0,0 +1,22 @@ +diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp +index ea168e4f..9287d433 100644 +--- a/public/client/TracyProfiler.cpp ++++ b/public/client/TracyProfiler.cpp +@@ -1454,7 +1454,7 @@ Profiler::~Profiler() + if( m_crashHandlerInstalled ) RemoveVectoredExceptionHandler( m_exceptionHandler ); + #endif + +-#ifdef __linux__ ++#if defined __linux__ && !defined TRACY_NO_CRASH_HANDLER + if( m_crashHandlerInstalled ) + { + sigaction( TRACY_CRASH_SIGNAL, &m_prevSignal.pwr, nullptr ); +@@ -1520,7 +1520,7 @@ bool Profiler::ShouldExit() + + void Profiler::Worker() + { +-#ifdef __linux__ ++#if defined __linux__ && !defined TRACY_NO_CRASH_HANDLER + s_profilerTid = syscall( SYS_gettid ); + #endif + diff --git a/ports/tracy/portfile.cmake b/ports/tracy/portfile.cmake index b235e777b6..1e2403b95f 100644 --- a/ports/tracy/portfile.cmake +++ b/ports/tracy/portfile.cmake @@ -14,11 +14,15 @@ vcpkg_from_github( 001-fix-vcxproj-vcpkg.patch 002-fix-capstone-5.patch 003-fix-imgui-path.patch + 004-fix-crash-handler.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - on-demand TRACY_ON_DEMAND) + on-demand TRACY_ON_DEMAND + INVERTED_FEATURES + crash-handler TRACY_NO_CRASH_HANDLER +) vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/tracy/vcpkg.json b/ports/tracy/vcpkg.json index a19431ddbc..14642e3d6d 100644 --- a/ports/tracy/vcpkg.json +++ b/ports/tracy/vcpkg.json @@ -1,7 +1,7 @@ { "name": "tracy", "version-semver": "0.9.0", - "port-version": 2, + "port-version": 3, "description": "A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.", "homepage": "https://github.com/wolfpld/tracy", "license": "BSD-3-Clause", @@ -20,6 +20,9 @@ "host": true } ], + "default-features": [ + "crash-handler" + ], "features": { "cli-tools": { "description": "Build Tracy command-line tools: `capture`, `csvexport`, `import-chrome` and `update`", @@ -35,6 +38,9 @@ } ] }, + "crash-handler": { + "description": "Enable crash handler" + }, "gui-tools": { "description": "Build Tracy GUI tool: `profiler` (aka `Tracy` executable)", "supports": "!(windows & x86)", diff --git a/versions/baseline.json b/versions/baseline.json index 0466b3c363..1c5b3b468c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7846,7 +7846,7 @@ }, "tracy": { "baseline": "0.9.0", - "port-version": 2 + "port-version": 3 }, "transwarp": { "baseline": "2.2.2", diff --git a/versions/t-/tracy.json b/versions/t-/tracy.json index f3325e16bc..c08acbbe2b 100644 --- a/versions/t-/tracy.json +++ b/versions/t-/tracy.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0866d3457267bff478bd158261b25869adf3e480", + "version-semver": "0.9.0", + "port-version": 3 + }, { "git-tree": "0a59d32d18bdd3f15658de8b36d8003d398f19ed", "version-semver": "0.9.0",