Skip to content

Update tracy to 0.12.0 #7259

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

Merged
merged 4 commits into from
Jun 1, 2025
Merged

Update tracy to 0.12.0 #7259

merged 4 commits into from
Jun 1, 2025

Conversation

gav2xlin
Copy link
Contributor

@gav2xlin gav2xlin commented May 31, 2025

  • Before adding new features and new modules, please go to issues to submit the relevant feature description first.
  • Write good commit messages and use the same coding conventions as the rest of the project.
  • Please commit code to dev branch and we will merge into master branch in feature
  • Ensure your edited codes with four spaces instead of TAB.

Hello. I update the version. https://github.com/wolfpld/tracy/releases

Does xmake-repo support application packages?

Tracy has nested projects:
cli applications
https://github.com/wolfpld/tracy/tree/master/capture to capture traces
https://github.com/wolfpld/tracy/tree/master/csvexport
https://github.com/wolfpld/tracy/tree/master/update

a gui application
https://github.com/wolfpld/tracy/tree/master/profiler

For example
https://github.com/Homebrew/homebrew-core/blob/master/Formula/t/tracy.rb:
system "cmake", "-S", ".", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
bin.install_symlink "tracy-profiler" => "tracy"


  • 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
  • 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
  • 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
  • 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。

@luadebug
Copy link
Contributor

luadebug commented May 31, 2025

Does xmake-repo support application packages?

Yes it does, use set_kind("binary"). So either creating another package for that:

tracy-capture
tracy-csvexport
tracy-update
tracy-profiler

Or either hide behind some add_configs in tracy package like https://github.com/xmake-io/xmake-repo/pull/7250/files (or better keystone)
In both cases need to test os.vrun("<BIN> -v").
Personally I would go for cli-tools & gui-tools add_configs in tracy package, placing them into bin folder & setting Path env variable pointing to bin folder & checking os.vrun.

@gav2xlin
Copy link
Contributor Author

@luadebug

tracy/Tracy.hpp: No such file or directory

xmake.lua:
assert(package:check_cxxsnippets({test = [[
#include <tracy/Tracy.hpp>
void test() {
TracyPlotConfig("PlotConfig", tracy::PlotFormatType::Number, true, true, 0);
}
]]}, {configs = {languages = "c++14"}}))

The authors moved that header deeper: tracy/tracy/Tracy.hpp

I don't like the approach of copying this code for every change in the project 🤔

assert(package:check_cxxsnippets({test = [[
#include <tracy/tracy/Tracy.hpp>
void test() {
TracyPlotConfig("PlotConfig", tracy::PlotFormatType::Number, true, true, 0);
}
]]}, {configs = {languages = "c++14"}}))

@luadebug
Copy link
Contributor

luadebug commented May 31, 2025

The authors moved that header deeper: tracy/tracy/Tracy.hpp

Looks like prepend workaround is working.

diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp
index 6fe7868..07d6753 100644
--- a/public/client/TracyProfiler.cpp
+++ b/public/client/TracyProfiler.cpp
@@ -1,5 +1,10 @@
 #ifdef TRACY_ENABLE
 
+#ifdef __MINGW32__
+#define __try try
+#define __except(filter) catch(...)
+#endif
+
 #ifdef _WIN32
 #  ifndef NOMINMAX
 #    define NOMINMAX

Might fix MinGW build.
I would try fix of HaxeFoundation/hxcpp#1153 for MSVC 2019

static_cast<LOGICAL_PROCESSOR_RELATIONSHIP>(5)

@waruqi waruqi merged commit b5d5913 into xmake-io:dev Jun 1, 2025
73 checks passed
@gav2xlin gav2xlin deleted the update-tracy branch June 1, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants