Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

1
vendor/profiling/.cargo-checksum.json vendored Normal file
View File

@@ -0,0 +1 @@
{"files":{"Cargo.lock":"34646e287d15fc4c25eee86a0fe4b016add9f1304c5966241bf08ad5299a51cc","Cargo.toml":"f0aa8099638ae52d2d33a774c546af0342b0ba7585a5af2f5deef9a2c5564a3a","README.md":"970c9abdb06b09f7cdb52ab5b5d578e2c928d0b909320c24fcdac9e526d45b1a","src/empty_impl.rs":"4d6ee3bb4add86d8b01a7ae5f319dce7b463d89e724dfcb031c3239fb1229eec","src/lib.rs":"2eb645fff043b95ac6e37b5304f0d1b0fe6d7935c68a644f21c4d6dd83aa1907","src/optick_impl.rs":"92430474c21bc49c3e54d8073b215772850d2498abf600d7c54cfd8acd92e5c6","src/puffin_impl.rs":"8d859ef3ca3f1deda8981ba9b9e7b9d3f2ea3c4417526d9ec4d188bc3806c167","src/superluminal_impl.rs":"061fe63327a9f4dbb5632f26482e44212aa08f8e26e60170076785fd279f2e5c","src/tracing_impl.rs":"94b74d71928478402863d85dcbb66e96da2268745ca5434106d1374b89b54261","src/tracy_impl.rs":"1b632448ed75bd698d3ed9067afdf05f60caec7a55ebf0258e2519afb951f890","src/type_check_impl.rs":"230d91cabf46a63f46e4a0e2764537634e6b10bdb879d44e21dd4ed02a12ad54"},"package":"3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773"}

786
vendor/profiling/Cargo.lock generated vendored Normal file
View File

@@ -0,0 +1,786 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "anyhow"
version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi",
]
[[package]]
name = "autocfg"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cc"
version = "1.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc"
dependencies = [
"shlex",
]
[[package]]
name = "cfg-if"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
[[package]]
name = "either"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "env_logger"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
dependencies = [
"atty",
"humantime",
"log",
"regex",
"termcolor",
]
[[package]]
name = "generator"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d18470a76cb7f8ff746cf1f7470914f900252ec36bbc40b569d74b1258446827"
dependencies = [
"cc",
"cfg-if",
"libc",
"log",
"rustversion",
"windows",
]
[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]
[[package]]
name = "humantime"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
dependencies = [
"quick-error",
]
[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "lock_api"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
dependencies = [
"autocfg",
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "loom"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca"
dependencies = [
"cfg-if",
"generator",
"scoped-tls",
"tracing",
"tracing-subscriber",
]
[[package]]
name = "matchers"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
dependencies = [
"regex-automata 0.1.10",
]
[[package]]
name = "memchr"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
dependencies = [
"overload",
"winapi",
]
[[package]]
name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "optick"
version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7e7ab6068cdba9928db83674b18fe7aa2efbaa9920698d260ecbaf7906c6548"
[[package]]
name = "overload"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "parking_lot"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
dependencies = [
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.9.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-targets",
]
[[package]]
name = "pin-project-lite"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
[[package]]
name = "proc-macro2"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
dependencies = [
"unicode-ident",
]
[[package]]
name = "profiling"
version = "1.0.17"
dependencies = [
"bincode",
"env_logger",
"lazy_static",
"log",
"optick",
"profiling-procmacros",
"puffin",
"superluminal-perf",
"tracing",
"tracing-subscriber",
"tracing-tracy",
"tracy-client",
]
[[package]]
name = "profiling-procmacros"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b"
dependencies = [
"quote",
"syn",
]
[[package]]
name = "puffin"
version = "0.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa9dae7b05c02ec1a6bc9bcf20d8bc64a7dcbf57934107902a872014899b741f"
dependencies = [
"anyhow",
"byteorder",
"cfg-if",
"itertools",
"once_cell",
"parking_lot",
]
[[package]]
name = "quick-error"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "redox_syscall"
version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6"
dependencies = [
"bitflags",
]
[[package]]
name = "regex"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata 0.4.9",
"regex-syntax 0.8.5",
]
[[package]]
name = "regex-automata"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
dependencies = [
"regex-syntax 0.6.29",
]
[[package]]
name = "regex-automata"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax 0.8.5",
]
[[package]]
name = "regex-syntax"
version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rustversion"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
[[package]]
name = "scoped-tls"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "sharded-slab"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
dependencies = [
"lazy_static",
]
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "smallvec"
version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "superluminal-perf"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f25a01f65079fdaf562930db1293d7a4abd4d98346a450cb7f37073af5c2b10"
dependencies = [
"superluminal-perf-sys",
]
[[package]]
name = "superluminal-perf-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c83d163f90b68349a742c75793727483b4d90a7bc77b7db434c79650f0b127e7"
[[package]]
name = "syn"
version = "2.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "termcolor"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
[[package]]
name = "thread_local"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
dependencies = [
"cfg-if",
]
[[package]]
name = "tracing"
version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
"pin-project-lite",
"tracing-attributes",
"tracing-core",
]
[[package]]
name = "tracing-attributes"
version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "tracing-core"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
dependencies = [
"once_cell",
"valuable",
]
[[package]]
name = "tracing-log"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
dependencies = [
"log",
"once_cell",
"tracing-core",
]
[[package]]
name = "tracing-subscriber"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
dependencies = [
"matchers",
"nu-ansi-term",
"once_cell",
"regex",
"sharded-slab",
"smallvec",
"thread_local",
"tracing",
"tracing-core",
"tracing-log",
]
[[package]]
name = "tracing-tracy"
version = "0.11.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eaa1852afa96e0fe9e44caa53dc0bd2d9d05e0f2611ce09f97f8677af56e4ba"
dependencies = [
"tracing-core",
"tracing-subscriber",
"tracy-client",
]
[[package]]
name = "tracy-client"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3927832d93178f979a970d26deed7b03510586e328f31b0f9ad7a73985b8332a"
dependencies = [
"loom",
"once_cell",
"tracy-client-sys",
]
[[package]]
name = "tracy-client-sys"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c032d68a49d25d9012a864fef1c64ac17aee43c87e0477bf7301d8ae8bfea7b7"
dependencies = [
"cc",
"windows-targets",
]
[[package]]
name = "unicode-ident"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "valuable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.61.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
dependencies = [
"windows-collections",
"windows-core",
"windows-future",
"windows-link",
"windows-numerics",
]
[[package]]
name = "windows-collections"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
dependencies = [
"windows-core",
]
[[package]]
name = "windows-core"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
dependencies = [
"windows-implement",
"windows-interface",
"windows-link",
"windows-result",
"windows-strings",
]
[[package]]
name = "windows-future"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
dependencies = [
"windows-core",
"windows-link",
"windows-threading",
]
[[package]]
name = "windows-implement"
version = "0.60.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "windows-interface"
version = "0.59.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "windows-link"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
[[package]]
name = "windows-numerics"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
dependencies = [
"windows-core",
"windows-link",
]
[[package]]
name = "windows-result"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
dependencies = [
"windows-link",
]
[[package]]
name = "windows-strings"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
dependencies = [
"windows-link",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows-threading"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
dependencies = [
"windows-link",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

107
vendor/profiling/Cargo.toml vendored Normal file
View File

@@ -0,0 +1,107 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
rust-version = "1.60"
name = "profiling"
version = "1.0.17"
authors = ["Philip Degarmo <aclysma@gmail.com>"]
build = false
exclude = [
"/examples",
"/screenshots",
]
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "This crate provides a very thin abstraction over other profiler crates."
homepage = "https://github.com/aclysma/profiling"
readme = "README.md"
keywords = [
"performance",
"profiling",
]
categories = ["development-tools::profiling"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/aclysma/profiling"
[lib]
name = "profiling"
path = "src/lib.rs"
[dependencies.optick]
version = "1.3"
optional = true
[dependencies.profiling-procmacros]
version = "1.0.17"
optional = true
[dependencies.puffin]
version = "0.19"
optional = true
[dependencies.superluminal-perf]
version = "0.4"
optional = true
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.tracy-client]
version = "0.18"
optional = true
[dev-dependencies.bincode]
version = "1.3.1"
[dev-dependencies.env_logger]
version = "0.6"
[dev-dependencies.lazy_static]
version = "1"
[dev-dependencies.log]
version = "0.4"
[dev-dependencies.tracing-subscriber]
version = "0.3"
[dev-dependencies.tracing-tracy]
version = "0.11.3"
[features]
default = ["procmacros"]
procmacros = ["profiling-procmacros"]
profile-with-optick = [
"optick",
"profiling-procmacros?/profile-with-optick",
]
profile-with-puffin = [
"puffin",
"profiling-procmacros?/profile-with-puffin",
]
profile-with-superluminal = [
"superluminal-perf",
"profiling-procmacros?/profile-with-superluminal",
]
profile-with-tracing = [
"tracing",
"profiling-procmacros?/profile-with-tracing",
]
profile-with-tracy = [
"tracy-client",
"profiling-procmacros?/profile-with-tracy",
]
type-check = []

246
vendor/profiling/README.md vendored Normal file
View File

@@ -0,0 +1,246 @@
# profiling
Provides a very thin abstraction over instrumented profiling crates like `puffin`, `optick`, `tracy`, and `superluminal-perf`.
Mark up your code like this:
```rust
#[profiling::function]
fn some_function() {
burn_time(5);
for i in 0..5 {
profiling::scope!("Looped Operation");
}
}
```
See below for resulting visualization and more details on the exposed API.
**Friendly Warning:** Some profiler backends implicitly listen on network ports immediately when the host app is
launched. If this is a concern, please review the enabled profiler(s) documentation for details!
## Puffin
* https://github.com/EmbarkStudios/puffin
* Cross-platform
* You need to call `profiling::finish_frame!()` at least once per frame
* To show the flamegraph, you either need to use [`puffin_http`](`https://github.com/EmbarkStudios/puffin/tree/main/puffin_http`) and [`puffin_viewer`](`https://github.com/EmbarkStudios/puffin/tree/main/puffin_viewer`), or if you're writing an [`egui`](https://github.com/emilk/egui) app, use [`puffin_egui`](`https://github.com/EmbarkStudios/puffin/tree/main/puffin_egui`).
[![Puffin](screenshots/puffin-small.png)](screenshots/puffin.png)
## Optick
* https://github.com/bombomby/optick
* The upstream crate only provides binaries for windows. However it could probably be made to work by building
optick capture code and linking against it manually. The UI is windows only.
[![Optick](screenshots/optick-small.png)](screenshots/optick.jpeg)
## Superluminal
* https://superluminal.eu
* Windows only
[![Superluminal](screenshots/superluminal-small.png)](screenshots/superluminal.jpeg)
## Tracing
* https://crates.io/crates/tracing
* Cross-platform
* The tracing backend injects tracing `span!()` macros that match the lifetime of the profiling macros.
Tracing uses callbacks rather than inlining specific pre-determined code,
so it is more flexible than profiling
(at the cost of more lines of code and potentially higher overhead).
This allows existing and new tracing-compatible handlers to work with profiling.
![Tracing](screenshots/tracing.png)
## Tracy
* https://github.com/wolfpld/tracy
* Cross-platform (windows, macOS, linux)
[![Tracy](screenshots/tracy-small.png)](screenshots/tracy.jpeg)
## Usage
Currently, there's just six macros:
* `profiling::scope!(name: &str, [tag: &str])`
* name: scopes will appear in the profiler under this name
* tag: optional extra data
* For maximum compatibility, you are **strongly** recommended to use literal strings for the name. Some backends require
static lifetime string references and some require literal strings.
* `#[profiling::function]`
* procmacro placed on a function to quickly wrap it in a scope using the function name
* `#[profiling::all_functions]`
* procmacro placed on a struct impl block to apply `#[profiling::function]` on each function under that struct impl block
* `#[profiling::skip]`
* use with `#[profiling::all_functions]`, placed this procmacro on a function to avoid the action that `#[profiling::all_functions]` apply
* `profiling::register_thread!([name: &str])`
* name: optional, defaults to `std::thread::current().name`, or `.id` if it's unnamed
* `profiling::finish_frame!()`
* Many profilers have the concept of a "frame" as a unit of work. Use this to indicate where one frame ends and the
next one begins.
* `profiling::function_scope!([tag: &str])`
* Macro that can be placed within a function to create a scope with the function name
* tag: optional extra data
Support for individual profilers can be turned on/off with feature flags. By default, they're all off, resulting in
no dependencies or runtime code.
## Who is this for?
* Authors of binaries that want to have multiple options for profiling their code, but don't want to duplicate their
instrumentation once per each profiler's individual API.
* Authors of libraries that would like to instrument their crate for their end-users.
This crate is intended to be **TINY**. It won't support every possible usage, just the basics. I'm open to adding
more things but I plan to be very selective to maintain a slim size.
When enabled, using a macro produces identical code as if you used the wrapped profiling API directly. So it is
completely fine to directly use a profiler's API when this abstraction doesn't support something you want to do.
## Alternatives
**tracing**: `tracing` is more flexible than `profiling` but is significantly larger and has
some potential runtime cost. `profiling` is only useful for instrumented profiling. Instrumentation is inserted directly
into your code inline via macros as if you were using the profiler's crate directly. This results in smaller code with
no additional overhead.
Using profiling crates (i.e. puffin/optick/etc.) directly:
* For authors of binaries, you may still need to use APIs on those crates to get started. But when instrumenting your
code, `profiling::scope!("Scope Name")` inside a function or `#[profiling::function]` on a function will instrument
it for all the supported profiler-specific crates. You can still use those crates directly if you want to take
advantage of custom APIs they provide to surface additional data.
* For authors of upstream libraries, this crate lets you implement simple instrumentation once. Hopefully this will
allow the community to benefit from instrumented profiling, even if a significant amount of a codebase is made
of upstream crates.
## Using from a Binary
It's up to you to initialize the profiling crate of your choice (although some do not need explicit initialization
and will immediately work). The examples demonstrate this for all the supported crates, but it's worth looking
at the docs for the profiler you're interested in using! `profiling` re-exports the profiler crates if they are
enabled, simplifying the modifications you would need to make to your Cargo.toml.
Once initialized, you can mix/match the macros provided by your profiler of choice and the generic ones in this
crate. For example:
```rust
// This may map to something like:
// - puffin::profile_scope!("Scope Name")
// - optick::event!("Scope Name")
// - tracing::span!(tracing::Level::INFO, "Scope Name")
// - superluminal_perf::begin_event("Scope Name")
profiling::scope!("Scope Name");
// This may map to something like:
// - puffin::profile_scope_data!("Scope Name", "extra data")
// - optick::event!("Scope Name"); optick::tag!("tag", "extra data");
// - tracing::span!(tracing::Level::INFO, "Scope Name", tag = "extra data")
// - superluminal_perf::begin_event_with_data("Scope Name", "extra data", 0)
profiling::scope!("Scope Name", "extra data");
```
There is also a proc macro to decorate functions:
```rust
#[profiling::function]
fn my_function() {
}
```
Take a look at the code for the helpful macros `register_thread!()` and `finish_frame!()`.
I recommend adding features for each backend you want to use to your binary crate. This allows you to optionally compile
in code to setup and configure a backend.
```toml
[dependencies]
profiling = "1.0"
[features]
profile-with-puffin = ["profiling/profile-with-puffin"]
profile-with-optick = ["profiling/profile-with-optick"]
profile-with-superluminal = ["profiling/profile-with-superluminal"]
profile-with-tracing = ["profiling/profile-with-tracing"]
profile-with-tracy = ["profiling/profile-with-tracy"]
```
* You can use the default feature to quickly/temporarily turn something on: `default = ["profile-with-optick"]`
* `cargo run --features=profile-with-optick` works too!
## Using from a Library
Add the profiling crate to Cargo.toml:
```toml
[dependencies]
profiling = "1.0"
```
Now you can instrument your library using the API exposed via the `profiling` crate.
If the end-user of your library doesn't use profiling, the macros in this crate will emit no code at all.
## Feature Flags
* profile-with-puffin: Enable the `puffin` crate
* profile-with-optick: Enable the `optick` crate
* profile-with-superluminal: Enable the `superluminal-perf` crate
* profile-with-tracing: Enable the `tracing` crate. (This is just an abstraction layer - you'd want to hook it to do something!)
* profile-with-tracy: Enable the `tracy-client` crate.
**Only one backend can be enabled at a time!**
## Examples
* simple: Shows a bare minimum requirements to do some simple instrumented profiling. Once it's running, you
can connect to the process using optick/tracy/superluminal. Some of these are windows only!
```
run --example simple --features="profile-with-optick"
run --example simple --features="profile-with-tracy"
run --example simple --features="profile-with-puffin"
run --example simple --features="profile-with-superluminal"
```
* puffin: Launches a basic app with imgui integration showing the puffin UI. This one should run everywhere
that supports imgui.
```
cargo run --example puffin --features="profile-with-puffin"
```
## MSRV
This project will strive to keep a conservative MSRV, but some backends will support a lower MSRV than others.
The MSRV set in this project only represents the MSRV for compiling the profiling crate with no backends
enabled.
As a point of reference, currently the most popular crate relying on profiling is wgpu, and their
MSRV is constrained to Firefox nightly build MSRV. So the MSRV of this crate (ignoring backends)
should not move faster than wgpu and firefox nightly. (See `MINIMUM_RUST_VERSION` in
[`python/mozboot/mozboot/util.py`](https://searchfox.org/mozilla-central/source/python/mozboot/mozboot/util.py))
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
The examples directory contains [`NotoSans-Medium.ttf`](https://www.google.com/get/noto/), available under SIL Open Font
License (OFL).
### Contribution
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.
See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT).

52
vendor/profiling/src/empty_impl.rs vendored Normal file
View File

@@ -0,0 +1,52 @@
/// Opens a scope. Two variants:
/// - profiling::scope!(name: &str) - Opens a scope with the given name
/// - profiling::scope!(name: &str, data: &str) - Opens a scope with the given name and an extra
/// datafield. Details of this depend on the API, but it should be a &str. If the extra data is
/// named, it will be named "tag". Some APIs support adding more data (for example, `optic::tag!`)
///
/// ```
/// profiling::scope!("outer");
/// for _ in 0..10 {
/// profiling::scope!("inner", format!("iteration {}").as_str());
/// }
/// ```
#[macro_export]
macro_rules! scope {
($name:expr) => {};
($name:expr, $data:expr) => {};
}
/// Opens a scope automatically named after the current function.
/// - profiling::function_scope!() - Opens a scope with the current function name
/// - profiling::function_scope!(data: &str) - Opens a scope with the current function name and an extra data field.
///
/// ```
/// fn function_a(){
/// profiling::function_scope!();
/// }
/// fn function_b(iteration: u32){
/// profiling::function_scope!(format!("iteration {}", iteration).as_str());
/// }
/// ```
#[macro_export]
macro_rules! function_scope {
() => {};
($data:expr) => {};
}
/// Registers a thread with the profiler API(s). This is usually setting a name for the thread.
/// Two variants:
/// - register_thread!() - Tries to get the name of the thread, or an ID if no name is set
/// - register_thread!(name: &str) - Registers the thread using the given name
#[macro_export]
macro_rules! register_thread {
() => {};
($name:expr) => {};
}
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
/// normal thing to track in games.
#[macro_export]
macro_rules! finish_frame {
() => {};
}

167
vendor/profiling/src/lib.rs vendored Normal file
View File

@@ -0,0 +1,167 @@
//
// To use this library, enable one of the feature flags. Each backend implementation provides the
// exact same interface. Only one may be active at a time.
//
// This library itself does not require std, but if any features are enabled, the upstream crate
// likely will bring in std.
#![no_std]
/// Proc macro for creating a scope around each function under struct impl block
/// ```
/// pub struct Foo {
/// // some data...
/// }
///
/// #[profiling::all_functions]
/// impl Foo {
/// pub fn do_something(&self) {
/// // some code...
/// }
///
/// pub fn do_otherthing(&self) {
/// // some code...
/// }
/// }
/// ```
///
/// The following will generate the same code
///
/// ```
/// pub struct Foo {
/// // some data...
/// }
///
/// impl Foo {
/// #[profiling::function]
/// pub fn do_something(&self) {
/// // some code...
/// }
///
/// #[profiling::function]
/// pub fn do_otherthing(&self) {
/// // some code...
/// }
/// }
/// ```
#[cfg(feature = "procmacros")]
pub use profiling_procmacros::all_functions;
/// Proc macro for creating a scope around the function, using the name of the function for the
/// scope's name
///
/// This must be done as a proc macro because tracing requires a const string
///
/// ```
/// #[profiling::function]
/// fn my_function() {
///
/// }
/// ```
#[cfg(feature = "procmacros")]
pub use profiling_procmacros::function;
/// Proc macro to skip the auto_impl for the function
/// ```
/// pub struct Foo {
/// // some data...
/// }
///
/// #[profiling::all_functions]
/// impl Foo {
/// pub fn do_something(&self) {
/// // some code...
/// }
///
/// #[profiling::skip]
/// pub fn do_otherthing(&self) {
/// // some code...
/// }
/// }
/// ```
///
/// The following will generate the same code
///
/// ```
/// pub struct Foo {
/// // some data...
/// }
///
/// impl Foo {
/// #[profiling::function]
/// pub fn do_something(&self) {
/// // some code...
/// }
///
/// pub fn do_otherthing(&self) {
/// // some code...
/// }
/// }
/// ```
#[cfg(feature = "procmacros")]
pub use profiling_procmacros::skip;
#[cfg(feature = "profile-with-puffin")]
pub use puffin;
#[cfg(feature = "profile-with-puffin")]
mod puffin_impl;
#[cfg(feature = "profile-with-puffin")]
#[allow(unused_imports)]
pub use puffin_impl::*;
#[cfg(feature = "profile-with-optick")]
pub use optick;
#[cfg(feature = "profile-with-optick")]
mod optick_impl;
#[cfg(feature = "profile-with-optick")]
#[allow(unused_imports)]
pub use optick_impl::*;
#[cfg(feature = "profile-with-superluminal")]
pub use superluminal_perf;
#[cfg(feature = "profile-with-superluminal")]
mod superluminal_impl;
#[cfg(feature = "profile-with-superluminal")]
#[allow(unused_imports)]
pub use superluminal_impl::*;
#[cfg(feature = "profile-with-tracing")]
pub use tracing;
#[cfg(feature = "profile-with-tracing")]
mod tracing_impl;
#[cfg(feature = "profile-with-tracing")]
#[allow(unused_imports)]
pub use tracing_impl::*;
#[cfg(feature = "profile-with-tracy")]
pub use tracy_client;
#[cfg(feature = "profile-with-tracy")]
mod tracy_impl;
#[cfg(feature = "profile-with-tracy")]
#[allow(unused_imports)]
pub use tracy_impl::*;
#[cfg(feature = "type-check")]
mod type_check_impl;
#[cfg(feature = "type-check")]
#[allow(unused_imports)]
pub use type_check_impl::*;
#[cfg(not(any(
feature = "profile-with-puffin",
feature = "profile-with-optick",
feature = "profile-with-superluminal",
feature = "profile-with-tracing",
feature = "profile-with-tracy",
feature = "type-check"
)))]
mod empty_impl;
#[cfg(not(any(
feature = "profile-with-puffin",
feature = "profile-with-optick",
feature = "profile-with-superluminal",
feature = "profile-with-tracing",
feature = "profile-with-tracy",
feature = "type-check"
)))]
#[allow(unused_imports)]
pub use empty_impl::*;

46
vendor/profiling/src/optick_impl.rs vendored Normal file
View File

@@ -0,0 +1,46 @@
#[macro_export]
macro_rules! scope {
($name:expr) => {
$crate::optick::event!($name);
};
// NOTE: I've not been able to get attached data to work with optick
($name:expr, $data:expr) => {
$crate::optick::event!($name);
$crate::optick::tag!("tag", $data);
};
}
#[macro_export]
macro_rules! function_scope {
() => {
$crate::optick::event!();
};
($data:expr) => {
$crate::optick::event!();
$crate::optick::tag!("tag", $data);
};
}
#[macro_export]
macro_rules! register_thread {
() => {
let thread_name = std::thread::current()
.name()
.map(|x| x.to_string())
.unwrap_or_else(|| format!("Thread {:?}", std::thread::current().id()));
$crate::register_thread!(&thread_name);
};
($name:expr) => {
$crate::optick::register_thread($name);
};
}
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
/// normal thing to track in games.
#[macro_export]
macro_rules! finish_frame {
() => {
$crate::optick::next_frame();
};
}

36
vendor/profiling/src/puffin_impl.rs vendored Normal file
View File

@@ -0,0 +1,36 @@
#[macro_export]
macro_rules! scope {
($name:expr) => {
$crate::puffin::profile_scope!($name);
};
($name:expr, $data:expr) => {
$crate::puffin::profile_scope!($name, $data);
};
}
#[macro_export]
macro_rules! function_scope {
() => {
$crate::puffin::profile_function!();
};
($data:expr) => {
$crate::puffin::profile_function!($data);
};
}
#[macro_export]
macro_rules! register_thread {
() => {};
($name:expr) => {
// puffin uses the thread name
};
}
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
/// normal thing to track in games.
#[macro_export]
macro_rules! finish_frame {
() => {
$crate::puffin::GlobalProfiler::lock().new_frame();
};
}

View File

@@ -0,0 +1,85 @@
#[macro_export]
macro_rules! scope {
($name:expr) => {
let _superluminal_guard = $crate::superluminal::SuperluminalGuard::new($name);
};
($name:expr, $data:expr) => {
let _superluminal_guard =
$crate::superluminal::SuperluminalGuard::new_with_data($name, $data);
};
}
#[macro_export]
macro_rules! function_scope {
() => {
let _function_name = {
struct S;
let type_name = core::any::type_name::<S>();
&type_name[..type_name.len() - 3]
};
$crate::scope!(_function_name);
};
($data:expr) => {
let _function_name = {
struct S;
let type_name = core::any::type_name::<S>();
&type_name[..type_name.len() - 3]
};
$crate::scope!(_function_name, $data);
};
}
#[macro_export]
macro_rules! register_thread {
() => {
let thread_name = std::thread::current()
.name()
.map(|x| x.to_string())
.unwrap_or_else(|| format!("Thread {:?}", std::thread::current().id()));
$crate::register_thread!(&thread_name);
};
($name:expr) => {
$crate::superluminal_perf::set_current_thread_name($name);
};
}
#[macro_export]
macro_rules! finish_frame {
() => {
// superluminal does not have a frame end function
};
}
//
// RAII wrappers to support superluminal. These are public as they need to be callable from macros
// but are not intended for direct use.
//
#[doc(hidden)]
pub mod superluminal {
pub struct SuperluminalGuard;
// 0xFFFFFFFF means "use default color"
const DEFAULT_SUPERLUMINAL_COLOR: u32 = 0xFFFFFFFF;
impl SuperluminalGuard {
pub fn new(name: &'static str) -> Self {
superluminal_perf::begin_event(name);
SuperluminalGuard
}
pub fn new_with_data(
name: &'static str,
data: &str,
) -> Self {
superluminal_perf::begin_event_with_data(name, data, DEFAULT_SUPERLUMINAL_COLOR);
SuperluminalGuard
}
}
impl Drop for SuperluminalGuard {
fn drop(&mut self) {
superluminal_perf::end_event();
}
}
}

57
vendor/profiling/src/tracing_impl.rs vendored Normal file
View File

@@ -0,0 +1,57 @@
#[macro_export]
macro_rules! scope {
($name:expr) => {
let _span = $crate::tracing::span!($crate::tracing::Level::INFO, $name);
let _span_entered = _span.enter();
};
($name:expr, $data:expr) => {
let _span = $crate::tracing::span!($crate::tracing::Level::INFO, $name, tag = $data);
let _span_entered = _span.enter();
};
}
#[macro_export]
macro_rules! function_scope {
() => {
let function_name = {
struct S;
let type_name = core::any::type_name::<S>();
&type_name[..type_name.len() - 3]
};
let _span = $crate::tracing::span!(
$crate::tracing::Level::INFO,
"function_scope",
"{}",
function_name
);
let _span_entered = _span.enter();
};
($data:expr) => {
let function_name = {
struct S;
let type_name = core::any::type_name::<S>();
&type_name[..type_name.len() - 3]
};
let _span = $crate::tracing::span!(
$crate::tracing::Level::INFO,
"function_scope",
tag = $data,
"{}",
function_name
);
let _span_entered = _span.enter();
};
}
#[macro_export]
macro_rules! register_thread {
() => {};
($name:expr) => {};
}
#[macro_export]
macro_rules! finish_frame {
() => {
$crate::tracing::event!($crate::tracing::Level::INFO, tracy.frame_mark = true);
};
}

82
vendor/profiling/src/tracy_impl.rs vendored Normal file
View File

@@ -0,0 +1,82 @@
#[macro_export]
macro_rules! scope {
// Note: literal patterns provided as an optimization since they can skip an allocation.
($name:literal) => {
// Note: callstack_depth is 0 since this has significant overhead
let _tracy_span = $crate::tracy_client::span!($name, 0);
};
($name:literal, $data:expr) => {
// Note: callstack_depth is 0 since this has significant overhead
let _tracy_span = $crate::tracy_client::span!($name, 0);
_tracy_span.emit_text($data);
};
($name:expr) => {
let _function_name = {
struct S;
let type_name = core::any::type_name::<S>();
&type_name[..type_name.len() - 3]
};
let _tracy_span = $crate::tracy_client::Client::running()
.expect("scope! without a running tracy_client::Client")
// Note: callstack_depth is 0 since this has significant overhead
.span_alloc(Some($name), _function_name, file!(), line!(), 0);
};
($name:expr, $data:expr) => {
let _function_name = {
struct S;
let type_name = core::any::type_name::<S>();
&type_name[..type_name.len() - 3]
};
let _tracy_span = $crate::tracy_client::Client::running()
.expect("scope! without a running tracy_client::Client")
// Note: callstack_depth is 0 since this has significant overhead
.span_alloc(Some($name), _function_name, file!(), line!(), 0);
_tracy_span.emit_text($data);
};
}
#[macro_export]
macro_rules! function_scope {
() => {
let _tracy_span = $crate::tracy_client::span!();
};
($data:expr) => {
let _location = $crate::tracy_client::span_location!();
let _tracy_span = $crate::tracy_client::Client::running()
.expect("function_scope! without a running tracy_client::Client")
.span(_location, 0);
_tracy_span.emit_text($data);
};
}
/// Registers a thread with the profiler API(s). This is usually setting a name for the thread.
/// Two variants:
/// - register_thread!() - Tries to get the name of the thread, or an ID if no name is set
/// - register_thread!(name: &str) - Registers the thread using the given name
#[macro_export]
macro_rules! register_thread {
() => {
let thread_name = std::thread::current()
.name()
.map(|x| x.to_string())
.unwrap_or_else(|| format!("Thread {:?}", std::thread::current().id()));
$crate::register_thread!(&thread_name);
};
($name:expr) => {
$crate::tracy_client::Client::running()
.expect("register_thread! without a running tracy_client::Client")
.set_thread_name($name);
};
}
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
/// normal thing to track in games.
#[macro_export]
macro_rules! finish_frame {
() => {
$crate::tracy_client::Client::running()
.expect("finish_frame! without a running tracy_client::Client")
.frame_mark();
};
}

33
vendor/profiling/src/type_check_impl.rs vendored Normal file
View File

@@ -0,0 +1,33 @@
// This backend is intended to force type checking
#[macro_export]
macro_rules! scope {
($name:expr) => {
let _: &str = $name;
};
($name:expr, $data:expr) => {
let _: &str = $name;
let _: &str = $data;
};
}
#[macro_export]
macro_rules! function_scope {
() => {};
($data:expr) => {
let _: &str = $data;
};
}
#[macro_export]
macro_rules! register_thread {
() => {};
($name:expr) => {
let _: &str = $name;
};
}
#[macro_export]
macro_rules! finish_frame {
() => {};
}