Skip to content

Commit dfa8d2c

Browse files
committed
Connect Rust code to Tracy (and upgrade Tracy to latest).
1 parent 965c75c commit dfa8d2c

16 files changed

+983
-11
lines changed

Cargo.lock

+127
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[workspace]
2-
members = ["src/rust"]
2+
members = ["src/rust", "lib/tracy-client-sys"]
3+
4+
[patch.crates-io]
5+
tracy-client-sys = { path = "lib/tracy-client-sys" }
36

47
# [patch."https://github.com/stellar/rs-soroban-env"]
58
# soroban-env-common = { path = "../rs-soroban-env/soroban-env-common" }

Makefile.am

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ TRACY_GUI_SOURCE=$(TRACY_GUI_DIR)/src
3232
TRACY_GUI_BUILD=$(TRACY_GUI_DIR)/build/unix
3333

3434
$(TRACY_GUI_BUILD)/Tracy-release: $(wildcard $(TRACY_GUI_SOURCE)/*.*)
35-
$(MAKE) -C $(TRACY_GUI_BUILD) release CC="$(CC)" CXX="$(CXX)" TRACY_NO_ISA_EXTENSIONS=1
35+
$(MAKE) -C $(TRACY_GUI_BUILD) release CC="$(CC)" CXX="$(CXX)" TRACY_NO_ISA_EXTENSIONS=1 TRACY_NO_LTO=1 LEGACY=1
3636

3737
tracy-gui: $(TRACY_GUI_BUILD)/Tracy-release
3838
cp -v $< $@
@@ -46,7 +46,7 @@ TRACY_CAPTURE_SOURCE=$(TRACY_CAPTURE_DIR)/src
4646
TRACY_CAPTURE_BUILD=$(TRACY_CAPTURE_DIR)/build/unix
4747

4848
$(TRACY_CAPTURE_BUILD)/capture-release: $(wildcard $(TRACY_CAPTURE_SOURCE)/*.*)
49-
$(MAKE) -C $(TRACY_CAPTURE_BUILD) release CC="$(CC)" CXX="$(CXX)" TRACY_NO_ISA_EXTENSIONS=1
49+
$(MAKE) -C $(TRACY_CAPTURE_BUILD) release CC="$(CC)" CXX="$(CXX)" TRACY_NO_ISA_EXTENSIONS=1 TRACY_NO_LTO=1 LEGACY=1
5050

5151
tracy-capture: $(TRACY_CAPTURE_BUILD)/capture-release
5252
cp -v $< $@
@@ -60,7 +60,7 @@ TRACY_CSVEXPORT_SOURCE=$(TRACY_CSVEXPORT_DIR)/src
6060
TRACY_CSVEXPORT_BUILD=$(TRACY_CSVEXPORT_DIR)/build/unix
6161

6262
$(TRACY_CSVEXPORT_BUILD)/csvexport-release: $(wildcard $(TRACY_CSVEXPORT_SOURCE)/*.*)
63-
$(MAKE) -C $(TRACY_CSVEXPORT_BUILD) release CC="$(CC)" CXX="$(CXX)" TRACY_NO_ISA_EXTENSIONS=1
63+
$(MAKE) -C $(TRACY_CSVEXPORT_BUILD) release CC="$(CC)" CXX="$(CXX)" TRACY_NO_ISA_EXTENSIONS=1 TRACY_NO_LTO=1 LEGACY=1
6464

6565
tracy-csvexport: $(TRACY_CSVEXPORT_BUILD)/csvexport-release
6666
cp -v $< $@

common.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AM_CPPFLAGS += -isystem "$(top_srcdir)/lib" \
99
-isystem "$(top_srcdir)/lib/util" \
1010
-isystem "$(top_srcdir)/lib/fmt/include" \
1111
-isystem "$(top_srcdir)/lib/soci/src/core" \
12-
-isystem "$(top_srcdir)/lib/tracy" \
12+
-isystem "$(top_srcdir)/lib/tracy/public/tracy" \
1313
-isystem "$(top_srcdir)/lib/spdlog/include" \
1414
-isystem "$(top_srcdir)/rust/src"
1515

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ AC_ARG_ENABLE(tracy,
335335
AS_HELP_STRING([--enable-tracy],
336336
[Enable 'tracy' profiler/tracer client stub]))
337337
AM_CONDITIONAL(USE_TRACY, [test x$enable_tracy = xyes])
338-
tracy_CFLAGS='-DTRACY_ENABLE -DTRACY_ON_DEMAND -DTRACY_NO_BROADCAST -DTRACY_ONLY_LOCALHOST -DTRACY_ONLY_IPV4'
338+
tracy_CFLAGS='-DTRACY_ENABLE -DTRACY_ON_DEMAND -DTRACY_NO_BROADCAST -DTRACY_ONLY_LOCALHOST -DTRACY_ONLY_IPV4 -DTRACY_DELAYED_INIT -DTRACY_MANUAL_LIFETIME'
339339
if test x"$enable_tracy" = xyes; then
340340
case "${host_os}" in
341341
*darwin*)

lib/tracy

Submodule tracy updated 387 files

lib/tracy-client-sys/Cargo.toml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Note this is a local override of tracy-client-sys with its generated.rs file
2+
# manually regenerated from the in-tree copy of Tracy that we use.
3+
4+
[package]
5+
name = "tracy-client-sys"
6+
version = "0.21.0"
7+
authors = ["Simonas Kazlauskas <[email protected]>"]
8+
license = "(MIT OR Apache-2.0) AND BSD-3-Clause"
9+
edition = "2018"
10+
repository = "https://github.com/nagisa/rust_tracy_client"
11+
homepage = "https://github.com/nagisa/rust_tracy_client"
12+
documentation = "https://docs.rs/tracy-client-sys"
13+
description = """
14+
Low level bindings to the client libraries for the Tracy profiler
15+
"""
16+
17+
[features]
18+
default = [ "enable" ]
19+
enable = []
20+
broadcast = []
21+
code-transfer = []
22+
context-switch-tracing = []
23+
sampling = []
24+
system-tracing = []

0 commit comments

Comments
 (0)