Skip to content

armgit / gecko

Public Imported from GitHub
0

A GameCube/Wii emulator and debugger written in Rust.

add hotpath

Layle0681963dee3e
diff --git a/Cargo.lock b/Cargo.lock
index bbbe9e6..916d178 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -46,7 +46,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
dependencies = [
"cfg-if",
- "getrandom",
+ "getrandom 0.3.4",
"once_cell",
"version_check",
"zerocopy",
@@ -125,13 +125,12 @@ dependencies = [
[[package]]
name = "annotate-snippets"
-version = "0.12.13"
+version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74fc7650eedcb2fee505aad48491529e408f0e854c2d9f63eb86c1361b9b3f93"
+checksum = "96401ca08501972288ecbcde33902fce858bf73fbcbdf91dab8c3a9544e106bb"
dependencies = [
"anstyle",
- "memchr",
- "unicode-width",
+ "unicode-width 0.2.0",
]
[[package]]
@@ -234,13 +233,19 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
+[[package]]
+name = "ascii"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
+
[[package]]
name = "ascii-canvas"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef1e3e699d84ab1b0911a1010c5c106aa34ae89aeac103be5ce0c3859db1e891"
dependencies = [
- "term",
+ "term 1.2.1",
]
[[package]]
@@ -275,6 +280,28 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+[[package]]
+name = "aws-lc-rs"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00"
+dependencies = [
+ "aws-lc-sys",
+ "zeroize",
+]
+
+[[package]]
+name = "aws-lc-sys"
+version = "0.41.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4"
+dependencies = [
+ "cc",
+ "cmake",
+ "dunce",
+ "fs_extra",
+]
+
[[package]]
name = "backend-wgpu"
version = "0.1.0"
@@ -284,6 +311,7 @@ dependencies = [
"crossbeam-channel",
"gecko",
"glam",
+ "hotpath",
"png",
"renderdoc",
"rustc-hash 2.1.2",
@@ -424,6 +452,12 @@ dependencies = [
"syn",
]
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
[[package]]
name = "byteorder-lite"
version = "0.1.0"
@@ -487,6 +521,21 @@ dependencies = [
"wayland-client",
]
+[[package]]
+name = "cassowary"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
+
+[[package]]
+name = "castaway"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"
+dependencies = [
+ "rustversion",
+]
+
[[package]]
name = "cc"
version = "1.2.57"
@@ -566,6 +615,12 @@ dependencies = [
"windows-link",
]
+[[package]]
+name = "chunked_transfer"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901"
+
[[package]]
name = "clap"
version = "4.6.1"
@@ -615,6 +670,15 @@ dependencies = [
"error-code",
]
+[[package]]
+name = "cmake"
+version = "0.1.58"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"
+dependencies = [
+ "cc",
+]
+
[[package]]
name = "codespan-reporting"
version = "0.12.0"
@@ -623,7 +687,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
dependencies = [
"serde",
"termcolor",
- "unicode-width",
+ "unicode-width 0.2.0",
]
[[package]]
@@ -666,9 +730,23 @@ version = "7.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "958c5d6ecf1f214b4c2bbbbf6ab9523a864bd136dcf71a7e8904799acfe1ad47"
dependencies = [
- "crossterm",
+ "crossterm 0.29.0",
"unicode-segmentation",
- "unicode-width",
+ "unicode-width 0.2.0",
+]
+
+[[package]]
+name = "compact_str"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
+dependencies = [
+ "castaway",
+ "cfg-if",
+ "itoa",
+ "rustversion",
+ "ryu",
+ "static_assertions",
]
[[package]]
@@ -995,6 +1073,22 @@ version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
+[[package]]
+name = "crossterm"
+version = "0.28.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6"
+dependencies = [
+ "bitflags 2.11.0",
+ "crossterm_winapi",
+ "mio",
+ "parking_lot",
+ "rustix 0.38.44",
+ "signal-hook",
+ "signal-hook-mio",
+ "winapi",
+]
+
[[package]]
name = "crossterm"
version = "0.29.0"
@@ -1003,9 +1097,13 @@ checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b"
dependencies = [
"bitflags 2.11.0",
"crossterm_winapi",
+ "derive_more",
"document-features",
+ "mio",
"parking_lot",
"rustix 1.1.4",
+ "signal-hook",
+ "signal-hook-mio",
"winapi",
]
@@ -1157,6 +1255,27 @@ dependencies = [
"crypto-common",
]
+[[package]]
+name = "dirs-next"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
+dependencies = [
+ "cfg-if",
+ "dirs-sys-next",
+]
+
+[[package]]
+name = "dirs-sys-next"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
[[package]]
name = "disasm"
version = "0.1.0"
@@ -1242,6 +1361,12 @@ dependencies = [
"image 0.1.0",
]
+[[package]]
+name = "dunce"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+
[[package]]
name = "dyn-clone"
version = "1.0.20"
@@ -1343,6 +1468,12 @@ dependencies = [
"log",
]
+[[package]]
+name = "encode_unicode"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
+
[[package]]
name = "env_home"
version = "0.1.0"
@@ -1406,6 +1537,16 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "eyre"
+version = "0.6.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"
+dependencies = [
+ "indenter",
+ "once_cell",
+]
+
[[package]]
name = "fax"
version = "0.2.6"
@@ -1539,6 +1680,12 @@ dependencies = [
"percent-encoding",
]
+[[package]]
+name = "fs_extra"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
+
[[package]]
name = "futures"
version = "0.3.32"
@@ -1650,6 +1797,7 @@ dependencies = [
"crossbeam-channel",
"disasm",
"glam",
+ "hotpath",
"hound",
"image 0.1.0",
"multiversion",
@@ -1680,6 +1828,19 @@ dependencies = [
"windows-link",
]
+[[package]]
+name = "getrandom"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi",
+ "wasm-bindgen",
+]
+
[[package]]
name = "getrandom"
version = "0.3.4"
@@ -1687,9 +1848,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
+ "js-sys",
"libc",
"r-efi",
"wasip2",
+ "wasm-bindgen",
]
[[package]]
@@ -1809,6 +1972,8 @@ version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
+ "allocator-api2",
+ "equivalent",
"foldhash 0.1.5",
]
@@ -1829,6 +1994,16 @@ version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
+[[package]]
+name = "hdrhistogram"
+version = "7.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d"
+dependencies = [
+ "byteorder",
+ "num-traits",
+]
+
[[package]]
name = "heck"
version = "0.5.0"
@@ -1847,12 +2022,172 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
+[[package]]
+name = "hotpath"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0482d7c2c47acfec79b90e55188e8b86c66fd9d541335eac3ce3f73055984643"
+dependencies = [
+ "cfg-if",
+ "clap",
+ "crossbeam-channel",
+ "crossterm 0.29.0",
+ "eyre",
+ "flate2",
+ "futures-util",
+ "hdrhistogram",
+ "hotpath-macros",
+ "hotpath-meta",
+ "libc",
+ "object 0.36.7",
+ "pin-project-lite",
+ "prettytable-rs",
+ "quanta",
+ "ratatui",
+ "regex",
+ "reqwest",
+ "rustc-demangle",
+ "serde",
+ "serde_json",
+ "tiny_http",
+ "tokio",
+]
+
+[[package]]
+name = "hotpath-macros"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0a541a2ab3263fcf42ff399ec68ddd458f4883aa656c6229f59092f94058eb2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "hotpath-macros-meta"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08986d10e50e7c6c8e1798fb1bd63cdf275c0b59d6aad05989d5d86a0f2cb06e"
+
+[[package]]
+name = "hotpath-meta"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fec29ccaa713ecf406bb6717331972fd2b932d889ddcc2bada67b264693fb9bf"
+dependencies = [
+ "hotpath-macros-meta",
+]
+
[[package]]
name = "hound"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
+[[package]]
+name = "http"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
+dependencies = [
+ "bytes",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
+dependencies = [
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "http",
+ "http-body",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "hyper"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "http",
+ "http-body",
+ "httparse",
+ "itoa",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+ "want",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.27.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f"
+dependencies = [
+ "http",
+ "hyper",
+ "hyper-util",
+ "rustls",
+ "tokio",
+ "tokio-rustls",
+ "tower-service",
+]
+
+[[package]]
+name = "hyper-util"
+version = "0.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
+dependencies = [
+ "base64",
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "ipnet",
+ "libc",
+ "percent-encoding",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+]
+
[[package]]
name = "iana-time-zone"
version = "0.1.65"
@@ -2028,6 +2363,12 @@ dependencies = [
"tiff",
]
+[[package]]
+name = "indenter"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5"
+
[[package]]
name = "indexmap"
version = "2.13.0"
@@ -2038,12 +2379,60 @@ dependencies = [
"hashbrown 0.16.1",
]
+[[package]]
+name = "indoc"
+version = "2.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
+dependencies = [
+ "rustversion",
+]
+
+[[package]]
+name = "instability"
+version = "0.3.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5eb2d60ef19920a3a9193c3e371f726ec1dafc045dac788d0fb3704272458971"
+dependencies = [
+ "darling",
+ "indoc",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
+
+[[package]]
+name = "is-terminal"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "windows-sys 0.61.2",
+]
+
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+[[package]]
+name = "itertools"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itertools"
version = "0.14.0"
@@ -2139,7 +2528,7 @@ version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
dependencies = [
- "getrandom",
+ "getrandom 0.3.4",
"libc",
]
@@ -2201,14 +2590,14 @@ dependencies = [
"ascii-canvas",
"bit-set",
"ena",
- "itertools",
+ "itertools 0.14.0",
"lalrpop-util",
"petgraph",
"regex",
"regex-syntax",
"sha3",
"string_cache",
- "term",
+ "term 1.2.1",
"unicode-xid",
"walkdir",
]
@@ -2415,6 +2804,21 @@ dependencies = [
"logos-codegen",
]
+[[package]]
+name = "lru"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
+dependencies = [
+ "hashbrown 0.15.5",
+]
+
+[[package]]
+name = "lru-slab"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
+
[[package]]
name = "lua-src"
version = "547.0.0"
@@ -2567,6 +2971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
dependencies = [
"libc",
+ "log",
"wasi",
"windows-sys 0.61.2",
]
@@ -3138,6 +3543,12 @@ version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+[[package]]
+name = "openssl-probe"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
+
[[package]]
name = "orbclient"
version = "0.3.51"
@@ -3361,6 +3772,19 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
+[[package]]
+name = "prettytable-rs"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a"
+dependencies = [
+ "encode_unicode",
+ "is-terminal",
+ "lazy_static",
+ "term 0.7.0",
+ "unicode-width 0.1.14",
+]
+
[[package]]
name = "proc-macro-crate"
version = "3.5.0"
@@ -3391,6 +3815,21 @@ version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d"
+[[package]]
+name = "quanta"
+version = "0.12.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7"
+dependencies = [
+ "crossbeam-utils",
+ "libc",
+ "once_cell",
+ "raw-cpuid",
+ "wasi",
+ "web-sys",
+ "winapi",
+]
+
[[package]]
name = "quick-error"
version = "2.0.1"
@@ -3406,6 +3845,62 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "quinn"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"
+dependencies = [
+ "bytes",
+ "cfg_aliases",
+ "pin-project-lite",
+ "quinn-proto",
+ "quinn-udp",
+ "rustc-hash 2.1.2",
+ "rustls",
+ "socket2",
+ "thiserror 2.0.18",
+ "tokio",
+ "tracing",
+ "web-time",
+]
+
+[[package]]
+name = "quinn-proto"
+version = "0.11.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098"
+dependencies = [
+ "aws-lc-rs",
+ "bytes",
+ "getrandom 0.3.4",
+ "lru-slab",
+ "rand",
+ "ring",
+ "rustc-hash 2.1.2",
+ "rustls",
+ "rustls-pki-types",
+ "slab",
+ "thiserror 2.0.18",
+ "tinyvec",
+ "tracing",
+ "web-time",
+]
+
+[[package]]
+name = "quinn-udp"
+version = "0.5.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
+dependencies = [
+ "cfg_aliases",
+ "libc",
+ "once_cell",
+ "socket2",
+ "tracing",
+ "windows-sys 0.60.2",
+]
+
[[package]]
name = "quote"
version = "1.0.45"
@@ -3447,7 +3942,7 @@ version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
dependencies = [
- "getrandom",
+ "getrandom 0.3.4",
]
[[package]]
@@ -3456,6 +3951,36 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"
+[[package]]
+name = "ratatui"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b"
+dependencies = [
+ "bitflags 2.11.0",
+ "cassowary",
+ "compact_str",
+ "crossterm 0.28.1",
+ "indoc",
+ "instability",
+ "itertools 0.13.0",
+ "lru",
+ "paste",
+ "strum",
+ "unicode-segmentation",
+ "unicode-truncate",
+ "unicode-width 0.2.0",
+]
+
+[[package]]
+name = "raw-cpuid"
+version = "11.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186"
+dependencies = [
+ "bitflags 2.11.0",
+]
+
[[package]]
name = "raw-window-handle"
version = "0.6.2"
@@ -3499,6 +4024,17 @@ dependencies = [
"bitflags 2.11.0",
]
+[[package]]
+name = "redox_users"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
+dependencies = [
+ "getrandom 0.2.17",
+ "libredox",
+ "thiserror 1.0.69",
+]
+
[[package]]
name = "ref-cast"
version = "1.0.25"
@@ -3601,6 +4137,57 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
+[[package]]
+name = "reqwest"
+version = "0.13.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0"
+dependencies = [
+ "base64",
+ "bytes",
+ "futures-core",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-rustls",
+ "hyper-util",
+ "js-sys",
+ "log",
+ "percent-encoding",
+ "pin-project-lite",
+ "quinn",
+ "rustls",
+ "rustls-pki-types",
+ "rustls-platform-verifier",
+ "serde",
+ "serde_json",
+ "sync_wrapper",
+ "tokio",
+ "tokio-rustls",
+ "tower",
+ "tower-http",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "ring"
+version = "0.17.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
+dependencies = [
+ "cc",
+ "cfg-if",
+ "getrandom 0.2.17",
+ "libc",
+ "untrusted",
+ "windows-sys 0.52.0",
+]
+
[[package]]
name = "ringbuf"
version = "0.5.0"
@@ -3743,12 +4330,93 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "rustls"
+version = "0.23.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b"
+dependencies = [
+ "aws-lc-rs",
+ "once_cell",
+ "rustls-pki-types",
+ "rustls-webpki",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-native-certs"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63"
+dependencies = [
+ "openssl-probe",
+ "rustls-pki-types",
+ "schannel",
+ "security-framework",
+]
+
+[[package]]
+name = "rustls-pki-types"
+version = "1.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9"
+dependencies = [
+ "web-time",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-platform-verifier"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0"
+dependencies = [
+ "core-foundation 0.10.1",
+ "core-foundation-sys",
+ "jni 0.22.4",
+ "log",
+ "once_cell",
+ "rustls",
+ "rustls-native-certs",
+ "rustls-platform-verifier-android",
+ "rustls-webpki",
+ "security-framework",
+ "security-framework-sys",
+ "webpki-root-certs",
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "rustls-platform-verifier-android"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
+
+[[package]]
+name = "rustls-webpki"
+version = "0.103.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
+dependencies = [
+ "aws-lc-rs",
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
[[package]]
name = "rustversion"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
+[[package]]
+name = "ryu"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
+
[[package]]
name = "same-file"
version = "1.0.6"
@@ -3758,6 +4426,15 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "schannel"
+version = "0.1.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
[[package]]
name = "schemars"
version = "1.2.1"
@@ -3830,6 +4507,29 @@ dependencies = [
"tiny-skia",
]
+[[package]]
+name = "security-framework"
+version = "3.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
+dependencies = [
+ "bitflags 2.11.0",
+ "core-foundation 0.10.1",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
[[package]]
name = "self_cell"
version = "1.2.2"
@@ -3921,6 +4621,27 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "signal-hook"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
+dependencies = [
+ "libc",
+ "signal-hook-registry",
+]
+
+[[package]]
+name = "signal-hook-mio"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
+dependencies = [
+ "libc",
+ "mio",
+ "signal-hook",
+]
+
[[package]]
name = "signal-hook-registry"
version = "1.4.8"
@@ -4062,6 +4783,16 @@ dependencies = [
"serde",
]
+[[package]]
+name = "socket2"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
+dependencies = [
+ "libc",
+ "windows-sys 0.61.2",
+]
+
[[package]]
name = "spin_sleep"
version = "1.3.3"
@@ -4116,6 +4847,34 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
+name = "subtle"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
[[package]]
name = "syn"
version = "2.0.117"
@@ -4127,6 +4886,15 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "sync_wrapper"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
+dependencies = [
+ "futures-core",
+]
+
[[package]]
name = "synstructure"
version = "0.13.2"
@@ -4150,6 +4918,17 @@ version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
+[[package]]
+name = "term"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f"
+dependencies = [
+ "dirs-next",
+ "rustversion",
+ "winapi",
+]
+
[[package]]
name = "term"
version = "1.2.1"
@@ -4262,6 +5041,18 @@ dependencies = [
"strict-num",
]
+[[package]]
+name = "tiny_http"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82"
+dependencies = [
+ "ascii",
+ "chunked_transfer",
+ "httpdate",
+ "log",
+]
+
[[package]]
name = "tinyapp"
version = "0.1.0"
@@ -4274,6 +5065,7 @@ dependencies = [
"egui-wgpu",
"egui-winit",
"gecko",
+ "hotpath",
"image 0.1.0",
"mimalloc",
"pollster",
@@ -4319,6 +5111,21 @@ dependencies = [
"tracing-subscriber",
]
+[[package]]
+name = "tinyvec"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
+
[[package]]
name = "tokio"
version = "1.52.3"
@@ -4330,6 +5137,7 @@ dependencies = [
"mio",
"pin-project-lite",
"signal-hook-registry",
+ "socket2",
"tokio-macros",
"windows-sys 0.61.2",
]
@@ -4345,6 +5153,16 @@ dependencies = [
"syn",
]
+[[package]]
+name = "tokio-rustls"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61"
+dependencies = [
+ "rustls",
+ "tokio",
+]
+
[[package]]
name = "tokio-util"
version = "0.7.18"
@@ -4388,6 +5206,51 @@ dependencies = [
"winnow",
]
+[[package]]
+name = "tower"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project-lite",
+ "sync_wrapper",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "tower-http"
+version = "0.6.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51"
+dependencies = [
+ "bitflags 2.11.0",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "pin-project-lite",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "url",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
+
+[[package]]
+name = "tower-service"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
+
[[package]]
name = "tracing"
version = "0.1.44"
@@ -4450,6 +5313,12 @@ dependencies = [
"tracing-log",
]
+[[package]]
+name = "try-lock"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+
[[package]]
name = "ttf-parser"
version = "0.25.1"
@@ -4498,11 +5367,28 @@ version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da36089a805484bcccfffe0739803392c8298778a2d2f09febf76fac5ad9025b"
+[[package]]
+name = "unicode-truncate"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf"
+dependencies = [
+ "itertools 0.13.0",
+ "unicode-segmentation",
+ "unicode-width 0.1.14",
+]
+
[[package]]
name = "unicode-width"
-version = "0.2.2"
+version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
+checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
+
+[[package]]
+name = "unicode-width"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "unicode-xid"
@@ -4510,6 +5396,12 @@ version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
+[[package]]
+name = "untrusted"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
+
[[package]]
name = "url"
version = "2.5.8"
@@ -4582,6 +5474,15 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
[[package]]
name = "wasi"
version = "0.11.1+wasi-snapshot-preview1"
@@ -4845,6 +5746,15 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "webpki-root-certs"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c"
+dependencies = [
+ "rustls-pki-types",
+]
+
[[package]]
name = "weezl"
version = "0.1.12"
@@ -4860,7 +5770,7 @@ dependencies = [
"annotate-snippets",
"derive_more",
"half",
- "itertools",
+ "itertools 0.14.0",
"num-traits",
"thiserror 2.0.18",
"wesl-macros",
@@ -4874,7 +5784,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d321ea9e1cc0a2e3de41c02e3a7586695a9c03beccb5460e938a7ccf00cb612"
dependencies = [
- "itertools",
+ "itertools 0.14.0",
"proc-macro2",
"quote",
"syn",
@@ -5038,7 +5948,7 @@ checksum = "946419efa46664a8070c512fb358ac4acfc6e6215c2396ae5afeb9b72dd6ca7d"
dependencies = [
"annotate-snippets",
"derive_more",
- "itertools",
+ "itertools 0.14.0",
"lalrpop",
"lalrpop-util",
"lexical",
@@ -5054,7 +5964,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7aed068ca1dc8fb182f574c9f2ace45ec988c71ba050f6dd334883fe3b8a88e2"
dependencies = [
"half",
- "itertools",
+ "itertools 0.14.0",
"num-traits",
]
@@ -5657,6 +6567,12 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zeroize"
+version = "1.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
+
[[package]]
name = "zerotrie"
version = "0.2.3"
diff --git a/crates/backend-wgpu/Cargo.toml b/crates/backend-wgpu/Cargo.toml
index aa95b03..4594f92 100644
--- a/crates/backend-wgpu/Cargo.toml
+++ b/crates/backend-wgpu/Cargo.toml
@@ -6,6 +6,7 @@ edition = "2024"
[features]
efb-writeback = ["gecko/efb-writeback"]
renderdoc-capture = ["dep:renderdoc"]
+hotpath = ["dep:hotpath", "hotpath/hotpath", "hotpath/crossbeam"]
[dependencies]
wgpu = "28.0.0"
@@ -19,3 +20,4 @@ tracing = "0.1.44"
rustc-hash = "2.1.2"
png = "0.18.1"
renderdoc = { version = "0.12.1", optional = true }
+hotpath = { version = "0.16.0", optional = true }
diff --git a/crates/backend-wgpu/src/sink.rs b/crates/backend-wgpu/src/sink.rs
index de3be2b..89c53c6 100644
--- a/crates/backend-wgpu/src/sink.rs
+++ b/crates/backend-wgpu/src/sink.rs
@@ -1,5 +1,19 @@
use crate::GxRenderer;
use crossbeam_channel::{Receiver, Sender, bounded};
+
+#[cfg(feature = "hotpath")]
+macro_rules! instrument_channel {
+ ($e:expr, $label:expr) => {
+ hotpath::channel!($e, label = $label)
+ };
+}
+#[cfg(not(feature = "hotpath"))]
+macro_rules! instrument_channel {
+ ($e:expr, $label:expr) => {
+ $e
+ };
+}
+
#[cfg(feature = "efb-writeback")]
use gecko::host::EfbWriteback;
use gecko::host::{DrawData, GxAction, RenderSink};
@@ -192,7 +206,8 @@ impl Renderer {
// Only created with `efb-writeback`.
#[cfg(feature = "efb-writeback")]
let writeback_rx = {
- let (writeback_tx, writeback_rx) = bounded::<EfbWriteback>(CHANNEL_CAPACITY);
+ let (writeback_tx, writeback_rx) =
+ instrument_channel!(bounded::<EfbWriteback>(CHANNEL_CAPACITY), "efb_writeback");
gx.set_efb_writeback_tx(writeback_tx);
writeback_rx
};
@@ -268,9 +283,11 @@ impl Renderer {
..Default::default()
});
- let (tx, rx) = bounded(CHANNEL_CAPACITY);
- let (boxes_tx, recycle_rx) = bounded::<Box<DrawData>>(RECYCLE_CAPACITY);
- let (batches_tx, batch_recycle_rx) = bounded::<Vec<GxAction>>(BATCH_RECYCLE_CAPACITY);
+ let (tx, rx) = instrument_channel!(bounded::<WorkerMsg>(CHANNEL_CAPACITY), "gx_actions");
+ let (boxes_tx, recycle_rx) =
+ instrument_channel!(bounded::<Box<DrawData>>(RECYCLE_CAPACITY), "draw_data_recycle");
+ let (batches_tx, batch_recycle_rx) =
+ instrument_channel!(bounded::<Vec<GxAction>>(BATCH_RECYCLE_CAPACITY), "batch_recycle");
let recyclers = Recyclers {
boxes: boxes_tx,
batches: batches_tx,
@@ -332,7 +349,7 @@ impl Renderer {
#[cfg(feature = "renderdoc-capture")]
pub fn begin_renderdoc_emulated_frame(&self) {
- let (ack_tx, ack_rx) = bounded(0);
+ let (ack_tx, ack_rx) = bounded::<()>(0);
if self.tx.send(WorkerMsg::BeginEmulatedFrame { ack: ack_tx }).is_err() {
tracing::warn!("failed to send RenderDoc frame-begin marker to renderer worker");
return;
diff --git a/crates/gecko/Cargo.toml b/crates/gecko/Cargo.toml
index 04f0c44..58c0bac 100644
--- a/crates/gecko/Cargo.toml
+++ b/crates/gecko/Cargo.toml
@@ -31,6 +31,7 @@ gx-stats = []
profile = ["dep:backtrace", "dep:windows-sys"]
# Enables std::hint::black_box inside `EmptyRenderSink::exec`
rendersink-blackbox = []
+hotpath = ["dep:hotpath", "hotpath/hotpath"]
[build-dependencies]
chipi-build = "0.9.1"
@@ -55,6 +56,7 @@ cranelift-jit = { version = "0.131.1", optional = true, features = ["selinux-fix
cranelift-module = { version = "0.131.1", optional = true }
cranelift-native = { version = "0.131.1", optional = true }
backtrace = { version = "0.3", optional = true }
+hotpath = { version = "0.16.0", optional = true }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61.2", features = [
diff --git a/crates/gecko/src/flipper/ai.rs b/crates/gecko/src/flipper/ai.rs
index efee478..213969b 100644
--- a/crates/gecko/src/flipper/ai.rs
+++ b/crates/gecko/src/flipper/ai.rs
@@ -94,6 +94,7 @@ pub fn stop_audio_dma<const SYSTEM: SystemId>(sys: &mut System<SYSTEM>) {
}
#[inline(always)]
+#[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn audio_dma_block_handler<const SYSTEM: SystemId>(sys: &mut System<SYSTEM>) {
if !sys.dsp.audio_dma_control.play() {
stop_audio_dma(sys);
diff --git a/crates/gecko/src/flipper/dsp/jit.rs b/crates/gecko/src/flipper/dsp/jit.rs
index cb97c05..73a5dd8 100644
--- a/crates/gecko/src/flipper/dsp/jit.rs
+++ b/crates/gecko/src/flipper/dsp/jit.rs
@@ -506,6 +506,7 @@ impl<const SYSTEM: SystemId> JitEngine<SYSTEM> {
tracing::info!("{}", self.ctx.func.display());
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure(label = "dsp_jit_compile"))]
fn compile(&mut self, spec: &block::BlockSpec) -> BlockEntry {
let func_id = self.func_id_for(spec.start_pc);
@@ -546,6 +547,7 @@ impl<const SYSTEM: SystemId> JitEngine<SYSTEM> {
self.clear_lookup_table();
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure(label = "dsp_jit_run_block"))]
pub fn run_block(&mut self, ctx_ptr: *mut core::ffi::c_void, entry: BlockEntry) -> u16 {
let next_pc_u32 = unsafe { (self.trampoline_fn)(ctx_ptr, entry) };
next_pc_u32 as u16
diff --git a/crates/gecko/src/flipper/gx.rs b/crates/gecko/src/flipper/gx.rs
index bf381f6..9a351c4 100644
--- a/crates/gecko/src/flipper/gx.rs
+++ b/crates/gecko/src/flipper/gx.rs
@@ -203,6 +203,7 @@ impl GraphicsProcessor {
}
}
+#[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn present_xfb<const SYSTEM: SystemId>(sys: &mut System<SYSTEM>) {
sys.vi_present_seen_this_frame = true;
sys.vsync_pending = true;
diff --git a/crates/gecko/src/flipper/gx/bp.rs b/crates/gecko/src/flipper/gx/bp.rs
index ca825b7..f6add75 100644
--- a/crates/gecko/src/flipper/gx/bp.rs
+++ b/crates/gecko/src/flipper/gx/bp.rs
@@ -7,6 +7,7 @@ use crate::mmio::{RamView, RamViewMut};
use std::time::Duration;
impl GraphicsProcessor {
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn load_bp(&mut self, renderer: &mut dyn RenderSink, ram: &mut RamViewMut<'_>, data: &[u8]) {
let idx = data[0] as usize;
let raw_val = u32::from_be_bytes([0, data[1], data[2], data[3]]);
@@ -419,6 +420,7 @@ impl GraphicsProcessor {
}
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
fn efb_copy(&mut self, renderer: &mut dyn RenderSink, ram: &mut RamViewMut<'_>, trigger: u32) {
let src = EfbCopySrc::from_raw(self.bp_regs[BP_PE_COPY_SRC]);
let dims = EfbCopyDims::from_raw(self.bp_regs[BP_PE_COPY_DIMS]);
diff --git a/crates/gecko/src/flipper/gx/fifo.rs b/crates/gecko/src/flipper/gx/fifo.rs
index 37f7984..9089d22 100644
--- a/crates/gecko/src/flipper/gx/fifo.rs
+++ b/crates/gecko/src/flipper/gx/fifo.rs
@@ -6,6 +6,7 @@ use crate::mmio::Mmio;
use crate::system::SystemId;
impl GraphicsProcessor {
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn drain_fifo<const SYSTEM: SystemId>(&mut self, mmio: &mut Mmio<SYSTEM>, renderer: &mut dyn RenderSink) {
let mut fifo = std::mem::take(&mut self.fifo);
@@ -18,6 +19,7 @@ impl GraphicsProcessor {
}
}
+#[cfg_attr(feature = "hotpath", hotpath::measure)]
fn drain_buf<const SYSTEM: SystemId>(
gp: &mut GraphicsProcessor,
mmio: &mut Mmio<SYSTEM>,
diff --git a/crates/gecko/src/flipper/gx/jit.rs b/crates/gecko/src/flipper/gx/jit.rs
index 5e2a05c..1775a4c 100644
--- a/crates/gecko/src/flipper/gx/jit.rs
+++ b/crates/gecko/src/flipper/gx/jit.rs
@@ -277,6 +277,7 @@ impl JitVertexEngine {
}
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure(label = "vtx_jit_compile"))]
fn compile(&mut self, key: VtxKey) -> Option<CompiledParser> {
self.seq = self.seq.wrapping_add(1);
let name = format!("gecko_vtx_parser_{:016x}", self.seq);
@@ -337,6 +338,7 @@ fn parser_signature(ptr: ir::Type, cc: CallConv) -> Signature {
/// `RamView::slice`; the JIT does pure pointer math without bounds
/// checks, so an OOB attribute would dereference unmapped memory
/// and segfault. (See `vertex.rs::fetch` for the interpreter path.)
+#[cfg_attr(feature = "hotpath", hotpath::measure(label = "vtx_resolve_arrays"))]
pub fn resolve_arrays_for_draw(
cp_regs: &[u32],
key: &VtxKey,
diff --git a/crates/gecko/src/flipper/gx/vertex.rs b/crates/gecko/src/flipper/gx/vertex.rs
index 4c2d91d..c0ca401 100644
--- a/crates/gecko/src/flipper/gx/vertex.rs
+++ b/crates/gecko/src/flipper/gx/vertex.rs
@@ -44,6 +44,7 @@ struct VertexFormat {
}
impl GraphicsProcessor {
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn create_draw_call<const SYSTEM: SystemId>(
&mut self,
mmio: &mut Mmio<SYSTEM>,
@@ -705,6 +706,7 @@ fn decode_color(data: &[u8], fmt: regs::ColorFormat, cnt: regs::ColorCount) -> [
}
}
+#[cfg_attr(feature = "hotpath", hotpath::measure)]
fn dispatch_decode<const SYSTEM: SystemId>(
gp: &mut GraphicsProcessor,
mmio: &mut Mmio<SYSTEM>,
@@ -752,6 +754,7 @@ fn dispatch_decode<const SYSTEM: SystemId>(
self::run_interpreter(gp, mmio, data, vertex_count, vf);
}
+#[cfg_attr(feature = "hotpath", hotpath::measure(label = "vtx_run_interpreter"))]
fn run_interpreter<const SYSTEM: SystemId>(
gp: &mut GraphicsProcessor,
mmio: &mut Mmio<SYSTEM>,
diff --git a/crates/gecko/src/flipper/gx/xf.rs b/crates/gecko/src/flipper/gx/xf.rs
index 9054f42..7448a86 100644
--- a/crates/gecko/src/flipper/gx/xf.rs
+++ b/crates/gecko/src/flipper/gx/xf.rs
@@ -86,6 +86,7 @@ impl GraphicsProcessor {
};
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn load_cp(&mut self, data: &[u8]) {
let idx = data[0] as usize;
let val = u32::from_be_bytes([data[1], data[2], data[3], data[4]]);
@@ -98,6 +99,7 @@ impl GraphicsProcessor {
);
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn load_xf(&mut self, renderer: &mut dyn RenderSink, data: &[u8]) {
let length = u16::from_be_bytes([data[0], data[1]]) as usize;
let addr = u16::from_be_bytes([data[2], data[3]]) as usize;
@@ -148,6 +150,7 @@ impl GraphicsProcessor {
}
#[inline(always)]
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn load_indexed_xf(
&mut self,
renderer: &mut dyn RenderSink,
diff --git a/crates/gecko/src/flipper/si.rs b/crates/gecko/src/flipper/si.rs
index b905a05..f7eb3c6 100644
--- a/crates/gecko/src/flipper/si.rs
+++ b/crates/gecko/src/flipper/si.rs
@@ -272,6 +272,7 @@ pub fn si_write<const SYSTEM: SystemId>(sys: &mut System<SYSTEM>, phys: u32, siz
}
#[inline(always)]
+#[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn refresh_interrupts<const SYSTEM: SystemId>(sys: &mut System<SYSTEM>) {
use crate::flipper::pi::InterruptFlag;
diff --git a/crates/gecko/src/gekko/jit.rs b/crates/gecko/src/gekko/jit.rs
index 8bad7dc..41a15f2 100644
--- a/crates/gecko/src/gekko/jit.rs
+++ b/crates/gecko/src/gekko/jit.rs
@@ -619,6 +619,7 @@ impl<const SYSTEM: SystemId> JitEngine<SYSTEM> {
id
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure(label = "ppc_jit_run_block"))]
pub fn run_block(&mut self, sys: &mut System<SYSTEM>) {
let pc = sys.gekko.pc;
let entry = self.lookup_or_compile(sys, pc);
@@ -801,6 +802,7 @@ impl<const SYSTEM: SystemId> JitEngine<SYSTEM> {
}
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure(label = "ppc_jit_compile"))]
fn compile(&mut self, spec: &block::BlockSpec, gprs: &[u32; 32]) -> BlockEntry {
let func_id = self.func_id_for(spec.start_pc);
diff --git a/crates/gecko/src/system.rs b/crates/gecko/src/system.rs
index 652b0a1..57eed04 100644
--- a/crates/gecko/src/system.rs
+++ b/crates/gecko/src/system.rs
@@ -203,11 +203,13 @@ impl<const SYSTEM: SystemId> System<SYSTEM> {
}
#[inline(always)]
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn prepare_frame(&mut self) {
self.begin_frame();
crate::flipper::si::refresh_interrupts(self);
}
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn run_until_vsync(&mut self) {
self.prepare_frame();
while !self.vsync_pending {
@@ -520,6 +522,7 @@ impl<const SYSTEM: SystemId> System<SYSTEM> {
/// `scheduler.cycles >= next_deadline`. Interrupts are checked at block
/// boundaries.
#[cfg(feature = "jit")]
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
fn run_until_deadline_jit(&mut self) {
let mut jit = match self.jit.take() {
Some(jit) => jit,
@@ -576,12 +579,14 @@ impl<const SYSTEM: SystemId> System<SYSTEM> {
}
#[inline(always)]
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn begin_frame(&mut self) {
self.vsync_pending = false;
self.si.update_polling();
}
#[inline(always)]
+ #[cfg_attr(feature = "hotpath", hotpath::measure)]
pub fn drain_events(&mut self) {
while let Some(f) = self.scheduler.poll() {
f(self);
diff --git a/crates/tinyapp/Cargo.toml b/crates/tinyapp/Cargo.toml
index 4730c18..2623793 100644
--- a/crates/tinyapp/Cargo.toml
+++ b/crates/tinyapp/Cargo.toml
@@ -14,6 +14,10 @@ fps-counter = ["gecko/fps-counter"]
jit-stats = ["gecko/jit-stats"]
gx-stats = ["gecko/gx-stats"]
profile = ["gecko/profile"]
+hotpath = ["dep:hotpath", "gecko/hotpath", "backend-wgpu/hotpath"]
+hotpath-alloc = ["hotpath", "hotpath/hotpath-alloc"]
+hotpath-cpu = ["hotpath", "hotpath/hotpath-cpu"]
+hotpath-tui = ["hotpath", "hotpath/tui"]
[dependencies]
gecko = { path = "../gecko" }
@@ -34,3 +38,4 @@ ringbuf = "0.5.0"
ctrlc = "3.5.2"
mimalloc = { version = "0.1.50", default-features = false }
spin_sleep = "1.3.3"
+hotpath = { version = "0.16.0", optional = true }
diff --git a/crates/tinyapp/src/main.rs b/crates/tinyapp/src/main.rs
index ac42245..5110be6 100644
--- a/crates/tinyapp/src/main.rs
+++ b/crates/tinyapp/src/main.rs
@@ -2,9 +2,37 @@ mod app;
mod audio;
mod thread;
+#[cfg(not(feature = "hotpath-alloc"))]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
+#[cfg(feature = "hotpath-alloc")]
+#[derive(Default)]
+struct DefaultMiMalloc;
+#[cfg(feature = "hotpath-alloc")]
+unsafe impl std::alloc::GlobalAlloc for DefaultMiMalloc {
+ #[inline]
+ unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {
+ unsafe { std::alloc::GlobalAlloc::alloc(&mimalloc::MiMalloc, layout) }
+ }
+ #[inline]
+ unsafe fn dealloc(&self, ptr: *mut u8, layout: std::alloc::Layout) {
+ unsafe { std::alloc::GlobalAlloc::dealloc(&mimalloc::MiMalloc, ptr, layout) }
+ }
+ #[inline]
+ unsafe fn alloc_zeroed(&self, layout: std::alloc::Layout) -> *mut u8 {
+ unsafe { std::alloc::GlobalAlloc::alloc_zeroed(&mimalloc::MiMalloc, layout) }
+ }
+ #[inline]
+ unsafe fn realloc(&self, ptr: *mut u8, layout: std::alloc::Layout, new_size: usize) -> *mut u8 {
+ unsafe { std::alloc::GlobalAlloc::realloc(&mimalloc::MiMalloc, ptr, layout, new_size) }
+ }
+}
+
+#[cfg(feature = "hotpath-alloc")]
+#[global_allocator]
+static GLOBAL: hotpath::CountingAllocator<DefaultMiMalloc> = hotpath::CountingAllocator::new();
+
use backend_wgpu::sink::TargetAspect;
use clap::Parser;
use gecko::HostInput;
@@ -157,6 +185,12 @@ fn resolve_aspect(arg: &str, system: SystemId) -> TargetAspect {
}
fn main() {
+ #[cfg(feature = "hotpath")]
+ let _hotpath_guard = hotpath::HotpathGuardBuilder::new("main")
+ .percentiles(&[50.0, 95.0, 99.0])
+ .functions_limit(64)
+ .build();
+
let args = Args::parse();
let present_mode = if args.immediate {