Skip to content

Commit 6b6049b

Browse files
committed
Add tracing-tracy/-chrome deps to rustc_log
Also adds the features tracing-tracy and tracing-chrome to enable those dependencies and to enable tracing. To properly make use of those features, they will need to be enableable from the bootstrap. Note: tracing-tracy depends on tracy C++ files which are licensed under BSD-3-Clause (see https://github.com/wolfpld/tracy/blob/master/LICENSE ), which are not currently allowed by rustc (see rust-lang#63232 (comment) )
1 parent 21079f5 commit 6b6049b

File tree

3 files changed

+148
-0
lines changed

3 files changed

+148
-0
lines changed

Cargo.lock

+136
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,19 @@ dependencies = [
14131413
"windows-bindgen",
14141414
]
14151415

1416+
[[package]]
1417+
name = "generator"
1418+
version = "0.8.4"
1419+
source = "registry+https://github.com/rust-lang/crates.io-index"
1420+
checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd"
1421+
dependencies = [
1422+
"cfg-if",
1423+
"libc",
1424+
"log",
1425+
"rustversion",
1426+
"windows 0.58.0",
1427+
]
1428+
14161429
[[package]]
14171430
name = "generic-array"
14181431
version = "0.14.7"
@@ -2163,6 +2176,19 @@ version = "0.4.27"
21632176
source = "registry+https://github.com/rust-lang/crates.io-index"
21642177
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
21652178

2179+
[[package]]
2180+
name = "loom"
2181+
version = "0.7.2"
2182+
source = "registry+https://github.com/rust-lang/crates.io-index"
2183+
checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca"
2184+
dependencies = [
2185+
"cfg-if",
2186+
"generator",
2187+
"scoped-tls",
2188+
"tracing",
2189+
"tracing-subscriber",
2190+
]
2191+
21662192
[[package]]
21672193
name = "lzma-sys"
21682194
version = "0.1.20"
@@ -3487,6 +3513,7 @@ dependencies = [
34873513
"rustc_hir",
34883514
"rustc_index",
34893515
"rustc_infer",
3516+
"rustc_log",
34903517
"rustc_macros",
34913518
"rustc_middle",
34923519
"rustc_mir_dataflow",
@@ -3974,8 +4001,10 @@ name = "rustc_log"
39744001
version = "0.0.0"
39754002
dependencies = [
39764003
"tracing",
4004+
"tracing-chrome",
39774005
"tracing-core",
39784006
"tracing-subscriber",
4007+
"tracing-tracy",
39794008
"tracing-tree",
39804009
]
39814010

@@ -5379,6 +5408,17 @@ dependencies = [
53795408
"syn 2.0.100",
53805409
]
53815410

5411+
[[package]]
5412+
name = "tracing-chrome"
5413+
version = "0.7.1"
5414+
source = "registry+https://github.com/rust-lang/crates.io-index"
5415+
checksum = "496b3cd5447f7ff527bbbf19b071ad542a000adf297d4127078b4dfdb931f41a"
5416+
dependencies = [
5417+
"serde_json",
5418+
"tracing-core",
5419+
"tracing-subscriber",
5420+
]
5421+
53825422
[[package]]
53835423
name = "tracing-core"
53845424
version = "0.1.30"
@@ -5429,6 +5469,17 @@ dependencies = [
54295469
"tracing-log",
54305470
]
54315471

5472+
[[package]]
5473+
name = "tracing-tracy"
5474+
version = "0.11.4"
5475+
source = "registry+https://github.com/rust-lang/crates.io-index"
5476+
checksum = "0eaa1852afa96e0fe9e44caa53dc0bd2d9d05e0f2611ce09f97f8677af56e4ba"
5477+
dependencies = [
5478+
"tracing-core",
5479+
"tracing-subscriber",
5480+
"tracy-client",
5481+
]
5482+
54325483
[[package]]
54335484
name = "tracing-tree"
54345485
version = "0.3.1"
@@ -5441,6 +5492,27 @@ dependencies = [
54415492
"tracing-subscriber",
54425493
]
54435494

5495+
[[package]]
5496+
name = "tracy-client"
5497+
version = "0.18.0"
5498+
source = "registry+https://github.com/rust-lang/crates.io-index"
5499+
checksum = "d90a2c01305b02b76fdd89ac8608bae27e173c829a35f7d76a345ab5d33836db"
5500+
dependencies = [
5501+
"loom",
5502+
"once_cell",
5503+
"tracy-client-sys",
5504+
]
5505+
5506+
[[package]]
5507+
name = "tracy-client-sys"
5508+
version = "0.24.3"
5509+
source = "registry+https://github.com/rust-lang/crates.io-index"
5510+
checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f"
5511+
dependencies = [
5512+
"cc",
5513+
"windows-targets 0.52.6",
5514+
]
5515+
54445516
[[package]]
54455517
name = "twox-hash"
54465518
version = "1.6.3"
@@ -5963,6 +6035,16 @@ dependencies = [
59636035
"windows-targets 0.52.6",
59646036
]
59656037

6038+
[[package]]
6039+
name = "windows"
6040+
version = "0.58.0"
6041+
source = "registry+https://github.com/rust-lang/crates.io-index"
6042+
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
6043+
dependencies = [
6044+
"windows-core 0.58.0",
6045+
"windows-targets 0.52.6",
6046+
]
6047+
59666048
[[package]]
59676049
name = "windows"
59686050
version = "0.59.0"
@@ -5996,6 +6078,19 @@ dependencies = [
59966078
"windows-targets 0.52.6",
59976079
]
59986080

6081+
[[package]]
6082+
name = "windows-core"
6083+
version = "0.58.0"
6084+
source = "registry+https://github.com/rust-lang/crates.io-index"
6085+
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
6086+
dependencies = [
6087+
"windows-implement 0.58.0",
6088+
"windows-interface 0.58.0",
6089+
"windows-result 0.2.0",
6090+
"windows-strings 0.1.0",
6091+
"windows-targets 0.52.6",
6092+
]
6093+
59996094
[[package]]
60006095
name = "windows-core"
60016096
version = "0.59.0"
@@ -6033,6 +6128,17 @@ dependencies = [
60336128
"syn 2.0.100",
60346129
]
60356130

6131+
[[package]]
6132+
name = "windows-implement"
6133+
version = "0.58.0"
6134+
source = "registry+https://github.com/rust-lang/crates.io-index"
6135+
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
6136+
dependencies = [
6137+
"proc-macro2",
6138+
"quote",
6139+
"syn 2.0.100",
6140+
]
6141+
60366142
[[package]]
60376143
name = "windows-implement"
60386144
version = "0.59.0"
@@ -6066,6 +6172,17 @@ dependencies = [
60666172
"syn 2.0.100",
60676173
]
60686174

6175+
[[package]]
6176+
name = "windows-interface"
6177+
version = "0.58.0"
6178+
source = "registry+https://github.com/rust-lang/crates.io-index"
6179+
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
6180+
dependencies = [
6181+
"proc-macro2",
6182+
"quote",
6183+
"syn 2.0.100",
6184+
]
6185+
60696186
[[package]]
60706187
name = "windows-interface"
60716188
version = "0.59.1"
@@ -6092,6 +6209,15 @@ dependencies = [
60926209
"windows-targets 0.52.6",
60936210
]
60946211

6212+
[[package]]
6213+
name = "windows-result"
6214+
version = "0.2.0"
6215+
source = "registry+https://github.com/rust-lang/crates.io-index"
6216+
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
6217+
dependencies = [
6218+
"windows-targets 0.52.6",
6219+
]
6220+
60956221
[[package]]
60966222
name = "windows-result"
60976223
version = "0.3.2"
@@ -6101,6 +6227,16 @@ dependencies = [
61016227
"windows-link",
61026228
]
61036229

6230+
[[package]]
6231+
name = "windows-strings"
6232+
version = "0.1.0"
6233+
source = "registry+https://github.com/rust-lang/crates.io-index"
6234+
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
6235+
dependencies = [
6236+
"windows-result 0.2.0",
6237+
"windows-targets 0.52.6",
6238+
]
6239+
61046240
[[package]]
61056241
name = "windows-strings"
61066242
version = "0.3.1"

compiler/rustc_log/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ edition = "2024"
66
[dependencies]
77
# tidy-alphabetical-start
88
tracing = "0.1.28"
9+
tracing-chrome = { version = "0.7", optional = true }
910
tracing-core = "=0.1.30" # FIXME(Nilstrieb) tracing has a deadlock: https://github.com/tokio-rs/tracing/issues/2635
1011
tracing-subscriber = { version = "0.3.3", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
12+
tracing-tracy = { version = "0.11", optional = true }
1113
tracing-tree = "0.3.1"
1214
# tidy-alphabetical-end
1315

1416
[features]
1517
# tidy-alphabetical-start
18+
default = ["tracing_chrome"] # TODO add to bootstrapping
1619
max_level_info = ['tracing/max_level_info']
20+
tracing_chrome = ['dep:tracing-chrome']
21+
tracing_tracy = ['dep:tracing-tracy']
1722
# tidy-alphabetical-end

src/tools/tidy/src/deps.rs

+7
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
288288
"fluent-syntax",
289289
"fnv",
290290
"foldhash",
291+
"generator",
291292
"generic-array",
292293
"getopts",
293294
"getrandom",
@@ -319,6 +320,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
319320
"litemap",
320321
"lock_api",
321322
"log",
323+
"loom",
322324
"matchers",
323325
"md-5",
324326
"measureme",
@@ -363,6 +365,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
363365
"rustc-stable-hash",
364366
"rustc_apfloat",
365367
"rustix",
368+
"rustversion",
366369
"ruzstd", // via object in thorin-dwp
367370
"ryu",
368371
"scoped-tls",
@@ -396,10 +399,14 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
396399
"tinyvec_macros",
397400
"tracing",
398401
"tracing-attributes",
402+
"tracing-chrome",
399403
"tracing-core",
400404
"tracing-log",
401405
"tracing-subscriber",
406+
"tracing-tracy",
402407
"tracing-tree",
408+
"tracy-client",
409+
"tracy-client-sys",
403410
"twox-hash",
404411
"type-map",
405412
"typenum",

0 commit comments

Comments
 (0)