Showing preview only (1,904K chars total). Download the full file or copy to clipboard to get everything.
Repository: nagisa/rust_tracy_client
Branch: main
Commit: baec2afb4bbc
Files: 121
Total size: 1.8 MB
Directory structure:
gitextract_i5_mabxw/
├── .github/
│ └── workflows/
│ ├── sys-update.yml
│ └── test.yml
├── .gitignore
├── Cargo.toml
├── FEATURES.mkd
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.mkd
├── examples/
│ ├── Cargo.toml
│ ├── README.mkd
│ └── src/
│ ├── main.rs
│ ├── plots/
│ │ └── mod.rs
│ ├── secondary_frames/
│ │ └── mod.rs
│ ├── threads/
│ │ └── mod.rs
│ ├── wgpu_frame_images/
│ │ ├── blit.wgsl
│ │ ├── mod.rs
│ │ └── triangle.wgsl
│ └── zones/
│ └── mod.rs
├── make_sys.sh
├── tracing-tracy/
│ ├── Cargo.toml
│ └── src/
│ ├── config.rs
│ ├── lib.rs
│ └── tests.rs
├── tracy-client/
│ ├── Cargo.toml
│ ├── benches/
│ │ └── client.rs
│ ├── src/
│ │ ├── demangle.rs
│ │ ├── frame.rs
│ │ ├── gpu.rs
│ │ ├── lib.rs
│ │ ├── plot.rs
│ │ ├── span.rs
│ │ └── state.rs
│ └── tests/
│ ├── loom.rs
│ └── tests.rs
└── tracy-client-sys/
├── Cargo.toml
├── build.rs
├── src/
│ ├── dbghelp.rs
│ ├── generated.rs
│ ├── generated_fibers.rs
│ ├── generated_manual_lifetime.rs
│ └── lib.rs
├── tests.rs
└── tracy/
├── LICENSE
├── TracyClient.F90
├── TracyClient.cpp
├── client/
│ ├── TracyAlloc.cpp
│ ├── TracyArmCpuTable.hpp
│ ├── TracyCallstack.cpp
│ ├── TracyCallstack.h
│ ├── TracyCallstack.hpp
│ ├── TracyCpuid.hpp
│ ├── TracyDebug.hpp
│ ├── TracyDxt1.cpp
│ ├── TracyDxt1.hpp
│ ├── TracyFastVector.hpp
│ ├── TracyKCore.cpp
│ ├── TracyKCore.hpp
│ ├── TracyLock.hpp
│ ├── TracyOverride.cpp
│ ├── TracyProfiler.cpp
│ ├── TracyProfiler.hpp
│ ├── TracyRingBuffer.hpp
│ ├── TracyRocprof.cpp
│ ├── TracyScoped.hpp
│ ├── TracyStringHelpers.hpp
│ ├── TracySysPower.cpp
│ ├── TracySysPower.hpp
│ ├── TracySysTime.cpp
│ ├── TracySysTime.hpp
│ ├── TracySysTrace.cpp
│ ├── TracySysTrace.hpp
│ ├── TracyThread.hpp
│ ├── tracy_SPSCQueue.h
│ ├── tracy_concurrentqueue.h
│ ├── tracy_rpmalloc.cpp
│ └── tracy_rpmalloc.hpp
├── common/
│ ├── TracyAlign.hpp
│ ├── TracyAlloc.hpp
│ ├── TracyApi.h
│ ├── TracyColor.hpp
│ ├── TracyForceInline.hpp
│ ├── TracyMutex.hpp
│ ├── TracyProtocol.hpp
│ ├── TracyQueue.hpp
│ ├── TracySocket.cpp
│ ├── TracySocket.hpp
│ ├── TracyStackFrames.cpp
│ ├── TracyStackFrames.hpp
│ ├── TracySystem.cpp
│ ├── TracySystem.hpp
│ ├── TracyVersion.hpp
│ ├── TracyWinFamily.hpp
│ ├── TracyYield.hpp
│ ├── tracy_lz4.cpp
│ ├── tracy_lz4.hpp
│ ├── tracy_lz4hc.cpp
│ └── tracy_lz4hc.hpp
├── libbacktrace/
│ ├── LICENSE
│ ├── alloc.cpp
│ ├── backtrace.hpp
│ ├── config.h
│ ├── dwarf.cpp
│ ├── elf.cpp
│ ├── fileline.cpp
│ ├── filenames.hpp
│ ├── internal.hpp
│ ├── macho.cpp
│ ├── mmapio.cpp
│ ├── posix.cpp
│ ├── sort.cpp
│ └── state.cpp
└── tracy/
├── Tracy.hpp
├── TracyC.h
├── TracyCUDA.hpp
├── TracyD3D11.hpp
├── TracyD3D12.hpp
├── TracyLua.hpp
├── TracyMetal.hmm
├── TracyOpenCL.hpp
├── TracyOpenGL.hpp
└── TracyVulkan.hpp
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/sys-update.yml
================================================
name: Update the tracy-client-sys crate
on:
workflow_dispatch:
schedule:
- cron: '37 0/6 * * *'
jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
- run: rustup install stable --profile=minimal
- run: rustup default stable
- run: cargo install bindgen-cli
- run: sudo apt install -y jq curl
- run: bash make_sys.sh
id: make_sys
- run: git diff
- if: ${{ steps.make_sys.outputs.tracy-changed }}
uses: actions/create-github-app-token@dff4b11d10ecc84d937fdd0653d8343a88c5b9c4
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- if: ${{ steps.make_sys.outputs.tracy-changed }}
name: Create Pull Request
uses: peter-evans/create-pull-request@88ed63ce144f5372efe9f999d8bb224f582d98d9
with:
token: ${{ steps.generate-token.outputs.token }}
title: "Update tracy client bindings to ${{ steps.make_sys.outputs.tracy-tag }}"
body: ''
delete-branch: true
branch: sys-update/${{ steps.make_sys.outputs.tracy-tag }}
base: main
================================================
FILE: .github/workflows/test.yml
================================================
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
types: [opened, repoened, synchronize]
jobs:
native-test-libraries:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust_toolchain: [nightly, stable, 1.82.0]
os: [ubuntu-latest, windows-latest, macOS-latest]
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal
- run: rustup default ${{ matrix.rust_toolchain }}
# FIXME: perhaps make this into a scrupt?
- run: cargo check -p tracy-client-sys
- run: cargo check -p tracy-client
- run: cargo check -p tracing-tracy
- run: cargo check -p tracy-client-examples
- run: cargo check -p tracy-client-sys --no-default-features
- run: cargo check -p tracy-client --no-default-features
- run: cargo check -p tracing-tracy --no-default-features
- run: cargo check -p tracy-client-sys --features=manual-lifetime
- run: cargo check -p tracy-client --features=manual-lifetime
- run: cargo check -p tracing-tracy --features=manual-lifetime
- run: cargo check -p tracy-client-sys --features=enable,fibers,system-tracing,context-switch-tracing,sampling,code-transfer,broadcast,only-localhost,only-ipv4,timer-fallback,ondemand,manual-lifetime,delayed-init,callstack-inlines
- run: cargo check -p tracy-client --features=enable,fibers,system-tracing,context-switch-tracing,sampling,code-transfer,broadcast,only-localhost,only-ipv4,timer-fallback,ondemand,manual-lifetime,delayed-init,callstack-inlines
- run: cargo check -p tracing-tracy --features=enable,fibers,system-tracing,context-switch-tracing,sampling,code-transfer,broadcast,only-localhost,only-ipv4,timer-fallback,ondemand,manual-lifetime,delayed-init,callstack-inlines
- run: cargo test ${{ matrix.flags }} -- --nocapture
env:
TRACY_NO_INVARIANT_CHECK: 1
- run: cargo test ${{ matrix.flags }} --release -- --nocapture
env:
TRACY_NO_INVARIANT_CHECK: 1
- run: cargo test ${{ matrix.flags }} --features=manual-lifetime -- --nocapture
env:
TRACY_NO_INVARIANT_CHECK: 1
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update
- run: sudo apt-get -y install libdebuginfod-dev
- run: rustup install nightly --profile=minimal
- run: rustup default nightly
- run: cargo rustdoc --all-features -p tracy-client-sys -Zunstable-options --config 'build.rustdocflags=["--cfg", "tracy_client_sys_docs", "-D", "rustdoc::broken_intra_doc_links"]'
- run: cargo rustdoc --all-features -p tracy-client -Zunstable-options --config 'build.rustdocflags=["--cfg", "tracy_client_docs", "-D", "rustdoc::broken_intra_doc_links"]'
- run: cargo rustdoc --all-features -p tracing-tracy -Zunstable-options --config 'build.rustdocflags=["--cfg", "tracing_tracy_docs", "-D", "rustdoc::broken_intra_doc_links"]'
================================================
FILE: .gitignore
================================================
target
Cargo.lock
================================================
FILE: Cargo.toml
================================================
[workspace]
members = [
"tracy-client-sys",
"tracy-client",
"tracing-tracy",
"examples",
]
resolver = "2"
[workspace.package]
edition = "2021"
repository = "https://github.com/nagisa/rust_tracy_client"
homepage = "https://github.com/nagisa/rust_tracy_client"
license = "MIT/Apache-2.0"
rust-version = "1.70.0"
================================================
FILE: FEATURES.mkd
================================================
* `enable` – enables the Tracy client. Corresponds to the `TRACY_ENABLE` define.
* `flush-on-exit` – waits for Tracy to connect and read out the profiling data before the program
terminates. Corresponds to the `TRACY_NO_EXIT` define. Does not work in combination with the
`manual-lifetime` feature.
* `manual-lifetime` – allow for manual initialization and deinitialization of the profiler data
structures. Corresponds to the `TRACY_MANUAL_LIFETIME` define. `tracy_client::Client`
transparently switches to manual lifetime management when this feature is enabled. Implies
`delayed-init`.
* `system-tracing` – enable capture of system level details. Corresponds to the
`TRACY_NO_SYSTEM_TRACING` define.
* `context-switch-tracing` – enable capture of the context switch data. Corresponds to the
`TRACY_NO_CONTEXT_SWITCH` define.
* `sampling` – enable periodic sampling of the call stack. Corresponds to the
`TRACY_NO_SAMPLING` define.
* `code-transfer` – enable transfer of the machine code to the profiler. Corresponds to the
`TRACY_NO_CODE_TRANSFER` define.
* `broadcast` – announce presence of the client to the profilers on the local network.
Corresponds to the `TRACY_NO_BROADCAST` define.
* `only-localhost` – listen for profilers on the localhost interface only. Corresponds to the
`TRACY_ONLY_LOCALHOST` define.
* `only-ipv4` – listen for profilers on IPv4 interfaces only. Corresponds to the
`TRACY_ONLY_IPV4` define.
* `timer-fallback` – allow running on devices without a high resolution timer support.
Corresponds to the `TRACY_TIMER_FALLBACK` define.
* `ondemand` – start collecting traces only when a server connects to the client. Corresponds
to the `TRACY_ON_DEMAND` define.
* `fibers` – enable support for instrumenting fibers, coroutines and similar such asynchrony
primitives. Corresponds to the `TRACY_FIBERS` define.
* `callstack-inlines` - enables resolution of inline frames for call stacks. Disabling it will make
the profiler use the basic but much faster frame resolution mode. Corresponds to the
`TRACY_NO_CALLSTACK_INLINES` define.
* `delayed-init` – initializes trace structures upon a first request, rather than at load time.
Corresponds to the `TRACY_DELAYED_INIT` define.
* `demangle` - requires that the demangling function be defined by the user.
See the `register_demangler!` macro for more details.
Corresponds to the `TRACY_DEMANGLE` define.
* `verify` - enables verification that instrumentation is well formed. Enabling this introduces
additional instrumentation overhead (~50% for 0 callstack depth spans.) When disabled
corresponds to the `TRACY_NO_VERIFY` define.
* `debuginfod` - enables debuginfo for system libraries on systems supporting debuginfod.
Corresponds to the `TRACY_DEBUGINFOD` define.
* `crash-handler` – activate signal handler that intercepts application crashes. Corresponds to the
`TRACY_NO_CRASH_HANDLER` define.
Refer to this package's `Cargo.toml` for the list of the features enabled by default. Refer to
the `Tracy` manual for more information on the implications of each feature.
================================================
FILE: LICENSE-APACHE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
================================================
FILE: LICENSE-MIT
================================================
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================
FILE: README.mkd
================================================
# Tracy profiler clients in Rust
This project contains Rust crates for producing [Tracy profiler](https://github.com/wolfpld/tracy)
traces. Tracy features nanosecond precision, ability to profile remotely and a full-featured
graphical interface for finding hot spots in profiled programs.
While Tracy's support for Rust is not first-class, it is still a very potent tool. If you have an
application instrumented with the `tracing` crate, Tracy can be used with your program in minutes
via the `tracing-tracy` crate. It can work well as both a profiling and, to a lesser extent,
an observability tool.
## Important note
Depending on the configuration Tracy may broadcast discovery packets to the local network and
expose the data it collects in the background to that same network. Traces collected by Tracy
may include source and assembly code as well.
As thus, you may want make sure to only enable the `tracing-tracy`, `tracy-client` and
`tracy-client-sys` crates conditionally, via the `enable` feature flag provided by the crates.
## Version support table
This project, unlike Tracy itself, follows semantic versioning. We will publish a breaking version
bump for `tracy-client-sys` whenever there is a potentially breaking protocol change, even if the
`Tracy` project itself does not. An older version of `Tracy` being unable to communicate with the
client of a more recent version is an example of such a breaking change.
`tracy-client`, `tracing-tracy` and other crates also follow semantic versioning, but do not
consider protocol breaks a breaking change for their purposes. For that reason each future version
of `tracy-client` may be able to support depending on a large number of incompatible
`tracy-client-sys` versions. Users are expected to select the version of `Tracy` profiler they
target and use precise version bounds in `Cargo.toml` or `Cargo.lock` to specify the version of
`tracy-client-sys` that they want to use.
The following table lists the version correspondence between the libraries.
| Tracy | tracy-client-sys | tracy-client | tracing-tracy |
| ----- | ---------------- | ------------ | ------------- |
| 0.7.1 | 0.9.0 | 0.8.0 | 0.2.0 |
| 0.7.3 | 0.10.0 | 0.9.0 | 0.3.0 |
| 0.7.4 | 0.11.0 | 0.10.0 | 0.4.0 |
| 0.7.5 | 0.12.0 | 0.11.0 | 0.5.0 |
| 0.7.6 | 0.13.0, 0.14.0 | 0.12.* | 0.6.* |
| v0.7.7 | 0.15.0 | 0.12.* | 0.6.* |
| v0.7.8 | 0.16.0 | 0.12.* | 0.6.* |
| v0.7.8 | 0.16.0 | 0.12.* | 0.7.* |
| v0.7.8 | 0.16.0 | 0.12.* | 0.8.* |
| v0.8.1 | 0.17.* | 0.13.* | 0.9.* |
| v0.8.1 | 0.17.* | 0.14.* | 0.10.* |
| v0.8.2 | 0.18.0 | 0.14.* | 0.10.* |
| v0.9 | 0.19.0 | 0.14.2 | 0.10.0 |
| v0.9 | 0.19.0 | 0.15.0 | 0.10.1 |
| v0.9.1 | 0.21.0 | 0.15.2 | 0.10.2 |
| v0.9.1 | 0.21.0 | 0.16.0 | 0.10.3 |
| v0.10 | 0.22.0 | 0.16.4 | 0.10.4 |
| v0.10 | 0.22.0 | 0.17.0 | 0.11.0 |
| v0.11.0 | 0.23.0 | 0.17.1 | 0.11.1 |
| v0.11.1 | 0.24.0 | 0.17.3 | 0.11.2 |
| v0.11.1 | 0.24.3 | 0.18.0 | 0.11.4 |
| v0.12.0 | 0.25.0 | 0.18.1 | 0.11.4 |
| v0.12.2 | 0.26.0 | 0.18.2 | 0.11.4 |
| v0.13.0 | 0.27.0 | 0.18.3 | 0.11.4 |
| v0.13.1 | 0.28.0 | 0.18.4 | 0.11.4 |
<!-- AUTO-UPDATE -->
================================================
FILE: examples/Cargo.toml
================================================
[package]
name = "tracy-client-examples"
publish = false
version = "0.17.4" # AUTO-BUMP
authors = ["Nathan Adams <dinnerbone@dinnerbone.com>"]
license.workspace = true
edition.workspace = true
rust-version.workspace = true
readme = "README.mkd"
repository.workspace = true
homepage.workspace = true
description = """
Examples for using `tracy-client` in a wgpu application
"""
[dependencies]
tracy-client = { path = "../tracy-client" }
wgpu = "23.0.1"
futures = "0.3.31"
rand = "0.8.4"
================================================
FILE: examples/README.mkd
================================================
# Examples for Tracy integration
These examples exist to demonstrate how to integrate the rust-Tracy API within an application.
They do not serve as examples of a real world application, but rather how an application would use a given API.
To use them, run `cargo run -p tracy-client-examples -- example_name` from within the repository root.
If you don't provide an `example_name`, it will list the available examples.
Be sure to have Tracy running and awaiting a connection, before running any example!
================================================
FILE: examples/src/main.rs
================================================
mod plots;
mod secondary_frames;
mod threads;
mod wgpu_frame_images;
mod zones;
struct ExampleDesc {
name: &'static str,
description: &'static str,
function: fn(),
}
const EXAMPLES: &[ExampleDesc] = &[
ExampleDesc {
name: "wgpu_frame_images",
description: "Demonstrates capturing frame images with wgpu",
function: wgpu_frame_images::main,
},
ExampleDesc {
name: "secondary_frames",
description: "Demonstrates secondary frames, both continuous and discontinuous",
function: secondary_frames::main,
},
ExampleDesc {
name: "zones",
description: "Demonstrates the use of zones to measure work",
function: zones::main,
},
ExampleDesc {
name: "threads",
description: "Demonstrates the use of zones across threads",
function: threads::main,
},
ExampleDesc {
name: "plots",
description: "Demonstrates plotting values",
function: plots::main,
},
];
fn main() {
let example_name = std::env::args().nth(1);
if let Some(example) = EXAMPLES
.iter()
.find(|e| Some(e.name) == example_name.as_deref())
{
(example.function)();
} else {
if let Some(name) = example_name {
eprintln!("Example {name} not found!");
}
println!("Available examples:");
for example in EXAMPLES {
println!("{}: {}", example.name, example.description);
}
}
}
================================================
FILE: examples/src/plots/mod.rs
================================================
use rand::Rng;
use std::thread::sleep;
use std::time::Duration;
use tracy_client::{Client, PlotConfiguration, PlotFormat, PlotLineStyle, PlotName};
// Plots you know statically can be defined freely like so
const PLOT_PLAYER_COUNT: PlotName = tracy_client::plot_name!("Player Count");
const PLOT_DISK_SPACE: PlotName = tracy_client::plot_name!("Disk Space");
pub fn main() {
let client = Client::start();
let mut rng = rand::thread_rng();
// Anything at runtime needs to be created via PlotName
let bandwidth = PlotName::new_leak("Bandwidth".to_string());
// You can configure how plots display, this only needs to be done once
client.plot_config(
PLOT_DISK_SPACE,
PlotConfiguration::default()
.format(PlotFormat::Memory)
.fill(false),
);
client.plot_config(
bandwidth,
PlotConfiguration::default()
.format(PlotFormat::Percentage)
.color(Some(0xFF0000))
.line_style(PlotLineStyle::Stepped),
);
for _ in 0..50 {
// You don't need to constantly send a value!
if rng.gen_bool(0.75) {
client.plot(PLOT_PLAYER_COUNT, rng.gen_range(0..10) as f64);
}
client.plot(PLOT_DISK_SPACE, rng.gen_range(0..1000000) as f64);
client.plot(bandwidth, rng.gen_range(0..100) as f64);
sleep(Duration::from_millis(20));
}
}
================================================
FILE: examples/src/secondary_frames/mod.rs
================================================
use rand::rngs::ThreadRng;
use rand::Rng;
use std::thread::sleep;
use std::time::Duration;
use tracy_client::{non_continuous_frame, secondary_frame_mark};
pub fn main() {
tracy_client::Client::start();
let mut rng = rand::thread_rng();
for _ in 0..100 {
simulate_physics(&mut rng);
if rng.gen_bool(0.75) {
simulate_rendering(&mut rng);
}
// This marks the boundary between two continuous frames
secondary_frame_mark!("Update Loop");
}
}
fn simulate_physics(rng: &mut ThreadRng) {
// This is a discontinuous frame; it has a defined start and stop
// In this case, the start is now - and the end is when _frame is dropped
let _frame = non_continuous_frame!("Physics");
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(10..20)));
}
fn simulate_rendering(rng: &mut ThreadRng) {
// This is a discontinuous frame; it has a defined start and stop
// In this case, the start is now - and the end is when _frame is dropped
let _frame = non_continuous_frame!("Rendering");
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(10..30)));
}
================================================
FILE: examples/src/threads/mod.rs
================================================
use rand::rngs::ThreadRng;
use rand::{thread_rng, Rng, RngCore};
use std::thread::{sleep, spawn};
use std::time::Duration;
use tracy_client::{set_thread_name, span, Client};
pub fn main() {
Client::start();
let mut handles = Vec::new();
handles.push(Box::new(spawn(|| {
// We can mark this thread with a custom name
set_thread_name!("Physics");
let mut rng = thread_rng();
for _ in 0..50 {
simulate_physics(&mut rng);
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(5..20)));
}
})));
handles.push(Box::new(spawn(|| {
// We can mark this thread with a custom name
set_thread_name!("Rendering");
let mut rng = thread_rng();
for _ in 0..50 {
simulate_rendering(&mut rng);
}
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(5..20)));
})));
for handle in handles {
handle.join().unwrap();
}
}
fn simulate_physics(rng: &mut ThreadRng) {
// This zone starts immediately, and ends when zone is dropped
let zone = span!("Physics");
// Zones can have custom colours!
zone.emit_color(0xFF0000);
for name in ["Cow", "Pig", "Player", "Robot"] {
// Let's imagine these names are dynamic
// To mark zones for them, we need to use a different method which temporarily allocates a zone location
let zone = Client::running().unwrap().span_alloc(
Some(name),
"perform_physics",
"physics.rs",
123,
0,
);
zone.emit_value(rng.next_u64()); // entity ID? Who knows!
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(5..20)));
if rng.gen_bool(0.15) {
let zone = span!("Collision");
// Zones can have arbitrary text!
zone.emit_text("Collided against a wall");
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(5..20)));
}
}
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(1..20)));
}
fn simulate_rendering(rng: &mut ThreadRng) {
// This zone starts immediately, and ends when zone is dropped
let zone = span!("Rendering");
// Zones can have custom colours!
zone.emit_color(0x00FF00);
for _ in 0..rng.gen_range(1..10) {
if rng.gen_bool(0.50) {
let zone = span!("Mesh");
zone.emit_color(rng.gen_range(0x000000..0xFFFFFF));
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(1..15)));
} else {
// Sometimes let's not mark it, just to show that zones don't have to next to eachother
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(1..15)));
}
}
}
================================================
FILE: examples/src/wgpu_frame_images/blit.wgsl
================================================
@group(0) @binding(0) var frame_sampler: sampler;
@group(0) @binding(1) var frame_texture: texture_2d<f32>;
struct VertexOutput {
@builtin(position) position: vec4<f32>,
@location(0) tex_coord: vec2<f32>,
}
// This shader copies an entire texture by basically drawing a giant triangle that happens to contain it all
@vertex fn vs_main(@builtin(vertex_index) vertex_index: u32) -> VertexOutput {
var result: VertexOutput;
let x = i32(vertex_index) / 2;
let y = i32(vertex_index) & 1;
let tc = vec2<f32>(
f32(x) * 2.0,
f32(y) * 2.0
);
result.position = vec4<f32>(
tc.x * 2.0 - 1.0,
1.0 - tc.y * 2.0,
0.0, 1.0
);
result.tex_coord = tc;
return result;
}
@fragment fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
return textureSample(frame_texture, frame_sampler, in.tex_coord);
}
================================================
FILE: examples/src/wgpu_frame_images/mod.rs
================================================
use futures::executor::block_on;
use std::borrow::Cow;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::thread::sleep;
use std::time::{Duration, Instant};
use tracy_client::frame_image;
pub fn main() {
tracy_client::Client::start();
let instance = wgpu::Instance::new(Default::default());
let adapter = block_on(instance.request_adapter(&Default::default())).unwrap();
let (device, queue) = block_on(adapter.request_device(
&wgpu::DeviceDescriptor {
label: None,
required_features: Default::default(),
required_limits: Default::default(),
memory_hints: Default::default(),
},
None,
))
.unwrap();
// We're just going to render to a decently large texture, pretending that that's a window.
// For this to work in a real application, you need to render to a texture which is then
// drawn back to the window surface
let mut game = Game::new(&device, 1280, 720);
for _ in 1..200 {
game.render(&device, &queue);
sleep(Duration::from_millis(20));
}
}
enum CaptureBufferStatus {
/// This buffer is free to use
Free,
/// This buffer has been reserved and commands to capture a texture have been encoded
Capturing { frame_num: u64 },
/// The capture commands have been submitted and we're waiting to map the buffer (when the GPU is ready)
Mapping {
frame_num: u64,
ready: Arc<AtomicBool>,
},
}
struct CaptureBuffer {
texture: wgpu::Texture,
view: wgpu::TextureView,
buffer: wgpu::Buffer,
status: CaptureBufferStatus,
}
impl CaptureBuffer {
/// Width of a capture texture
/// This MUST be a multiple of 4.
const WIDTH: u32 = 320;
/// Height of a capture texture
/// This MUST be a multiple of 4.
const HEIGHT: u32 = 180;
/// Amount of capture buffers to use
/// If there's more than this much in flight, no more will be captured and we may lose frames in Tracy.
/// If there's too many, we're wasting memory.
/// Tune it to your preferences and use case, or make it dynamic!
const AMOUNT: usize = 3;
fn new(device: &wgpu::Device) -> Self {
// This will stretch the captured image if the aspect ratio doesn't match
// In a real application you'll want to resize these buffers to preserve the aspect ratio
let texture = device.create_texture(&wgpu::TextureDescriptor {
label: None,
size: wgpu::Extent3d {
width: Self::WIDTH,
height: Self::HEIGHT,
depth_or_array_layers: 1,
},
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format: wgpu::TextureFormat::Rgba8Unorm,
usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::COPY_SRC,
view_formats: &[],
});
let view = texture.create_view(&wgpu::TextureViewDescriptor::default());
// 4 bytes per pixel (Tracy wants RGBA)
let bytes_per_row = Self::WIDTH * 4;
let padded_bytes_per_row =
wgpu::util::align_to(bytes_per_row, wgpu::COPY_BYTES_PER_ROW_ALIGNMENT);
let buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: None,
size: (padded_bytes_per_row * Self::HEIGHT * 4) as wgpu::BufferAddress,
usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ,
mapped_at_creation: false,
});
Self {
texture,
view,
buffer,
status: CaptureBufferStatus::Free,
}
}
pub fn submit_to_tracy(&self, current_frame: u64, frame_num: u64) {
// If we're so far behind we couldn't even fit into a u8, just drop it.
let Some(offset) = current_frame
.checked_sub(frame_num)
.and_then(|o| u8::try_from(o).ok())
else {
return;
};
// Tracy needs a raw rgba image with no padding, so we have to remove it
let mut unpadded = Vec::with_capacity(Self::WIDTH as usize * Self::HEIGHT as usize * 4);
let padded_width =
wgpu::util::align_to(Self::WIDTH * 4, wgpu::COPY_BYTES_PER_ROW_ALIGNMENT);
let buffer = self.buffer.slice(..).get_mapped_range();
for row in 0..Self::HEIGHT {
let start = row as usize * padded_width as usize;
let end = start + (Self::WIDTH as usize * 4);
unpadded.extend_from_slice(&buffer[start..end]);
}
// Submit it!
frame_image(
&unpadded,
Self::WIDTH as u16,
Self::HEIGHT as u16,
offset,
false,
);
}
}
/// An amazing game that renders a spinning triangle. Technology!
struct Game {
renderer: TriangleRenderer,
frame_buffer_view: wgpu::TextureView,
blit_pipeline: wgpu::RenderPipeline,
blit_frame_buffer_bind_group: wgpu::BindGroup,
frame_count: u64,
frame_captures: [CaptureBuffer; CaptureBuffer::AMOUNT],
}
impl Game {
fn new(device: &wgpu::Device, width: u32, height: u32) -> Game {
let renderer = TriangleRenderer::new(device);
// A trivial blit (copy) pipeline; used both to render the game, and to take screenshots for Tracy
let blit_shader_module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: None,
source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(include_str!("blit.wgsl"))),
});
let blit_bind_group_layout =
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: None,
entries: &[
wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStages::FRAGMENT,
ty: wgpu::BindingType::Sampler(wgpu::SamplerBindingType::Filtering),
count: None,
},
wgpu::BindGroupLayoutEntry {
binding: 1,
visibility: wgpu::ShaderStages::FRAGMENT,
ty: wgpu::BindingType::Texture {
sample_type: wgpu::TextureSampleType::Float { filterable: true },
view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false,
},
count: None,
},
],
});
let blit_pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: None,
bind_group_layouts: &[&blit_bind_group_layout],
push_constant_ranges: &[],
});
let blit_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: None,
layout: Some(&blit_pipeline_layout),
vertex: wgpu::VertexState {
module: &blit_shader_module,
entry_point: None,
compilation_options: Default::default(),
buffers: &[],
},
primitive: Default::default(),
depth_stencil: None,
multisample: Default::default(),
fragment: Some(wgpu::FragmentState {
module: &blit_shader_module,
entry_point: None,
compilation_options: Default::default(),
targets: &[Some(wgpu::TextureFormat::Rgba8Unorm.into())],
}),
multiview: None,
cache: None,
});
let blit_sampler = device.create_sampler(&wgpu::SamplerDescriptor {
label: None,
address_mode_u: wgpu::AddressMode::ClampToEdge,
address_mode_v: wgpu::AddressMode::ClampToEdge,
mag_filter: wgpu::FilterMode::Linear,
min_filter: wgpu::FilterMode::Linear,
..Default::default()
});
// We'll render the game to an intermediary texture (frame_buffer),
// this allows us to take copies of the texture at will (aka screenshots)
let frame_buffer = device.create_texture(&wgpu::TextureDescriptor {
label: None,
size: wgpu::Extent3d {
width,
height,
depth_or_array_layers: 1,
},
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format: wgpu::TextureFormat::Rgba8Unorm,
usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING,
view_formats: &[],
});
let frame_buffer_view = frame_buffer.create_view(&Default::default());
let blit_frame_buffer_bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor {
label: None,
layout: &blit_bind_group_layout,
entries: &[
wgpu::BindGroupEntry {
binding: 0,
resource: wgpu::BindingResource::Sampler(&blit_sampler),
},
wgpu::BindGroupEntry {
binding: 1,
resource: wgpu::BindingResource::TextureView(&frame_buffer_view),
},
],
});
let tracy_frame_buffers: [CaptureBuffer; CaptureBuffer::AMOUNT] =
core::array::from_fn(|_| CaptureBuffer::new(device));
Self {
renderer,
frame_buffer_view,
blit_pipeline,
blit_frame_buffer_bind_group,
frame_count: 0,
frame_captures: tracy_frame_buffers,
}
}
fn render(&mut self, device: &wgpu::Device, queue: &wgpu::Queue) {
let mut encoder = device.create_command_encoder(&Default::default());
self.renderer
.render(queue, &mut encoder, &self.frame_buffer_view);
// Here's where we'd blit it to the surface... if we had one...
// Before we submit everything, but _after the frame buffer is finished_, let's try to capture an image
if let Some(capture) = self
.frame_captures
.iter_mut()
.find(|c| matches!(c.status, CaptureBufferStatus::Free))
{
// We've got a free capture slot! First blit our frame buffer over to the texture
let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: None,
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: &capture.view,
resolve_target: None,
ops: Default::default(),
})],
depth_stencil_attachment: None,
timestamp_writes: None,
occlusion_query_set: None,
});
render_pass.set_pipeline(&self.blit_pipeline);
render_pass.set_bind_group(0, &self.blit_frame_buffer_bind_group, &[]);
render_pass.draw(0..3, 0..1);
drop(render_pass);
// Then copy the texture to a buffer
encoder.copy_texture_to_buffer(
wgpu::ImageCopyTexture {
texture: &capture.texture,
mip_level: 0,
origin: wgpu::Origin3d::ZERO,
aspect: wgpu::TextureAspect::All,
},
wgpu::ImageCopyBuffer {
buffer: &capture.buffer,
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(wgpu::util::align_to(
CaptureBuffer::WIDTH * 4,
wgpu::COPY_BYTES_PER_ROW_ALIGNMENT,
)),
rows_per_image: Some(CaptureBuffer::HEIGHT),
},
},
capture.texture.size(),
);
// And mark it ready for mapping (that has to happen AFTER this encoder is submitted)
capture.status = CaptureBufferStatus::Capturing {
frame_num: self.frame_count,
};
}
queue.submit(Some(encoder.finish()));
// Here's where we'd present the surface
// Tell tracy that's the end of a frame - it's usually expected that this is immediately after presenting to the surface
tracy_client::frame_mark();
// We're tracking "number of frames we've told Tracy about" - so increment it here vs anywhere else
self.frame_count += 1;
// Now that we've submitted everything, let's find out if any of our captures are ready
for capture in &mut self.frame_captures {
match &capture.status {
// Nothing to do
CaptureBufferStatus::Free => continue,
// We'll need to try and map this
CaptureBufferStatus::Capturing { frame_num } => {
let ready = Arc::new(AtomicBool::new(false));
capture.status = CaptureBufferStatus::Mapping {
frame_num: *frame_num,
ready: ready.clone(),
};
capture
.buffer
.slice(..)
.map_async(wgpu::MapMode::Read, move |_| {
ready.store(true, Ordering::Relaxed);
});
}
// If this is ready, submit it to Tracy and then free it up for a new capture
CaptureBufferStatus::Mapping { frame_num, ready } => {
if ready.load(Ordering::Relaxed) {
capture.submit_to_tracy(self.frame_count, *frame_num);
capture.buffer.unmap();
capture.status = CaptureBufferStatus::Free;
}
}
}
}
}
}
struct TriangleRenderer {
pipeline: wgpu::RenderPipeline,
buffer: wgpu::Buffer,
bind_group: wgpu::BindGroup,
start: Instant,
}
impl TriangleRenderer {
fn new(device: &wgpu::Device) -> Self {
let triangle_shader_module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: None,
source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(include_str!("triangle.wgsl"))),
});
let bind_group_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: None,
entries: &[wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStages::VERTEX,
ty: wgpu::BindingType::Buffer {
ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: None,
},
count: None,
}],
});
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: None,
bind_group_layouts: &[&bind_group_layout],
push_constant_ranges: &[],
});
let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: None,
layout: Some(&pipeline_layout),
vertex: wgpu::VertexState {
module: &triangle_shader_module,
entry_point: None,
compilation_options: Default::default(),
buffers: &[],
},
primitive: Default::default(),
depth_stencil: None,
multisample: Default::default(),
fragment: Some(wgpu::FragmentState {
module: &triangle_shader_module,
entry_point: None,
compilation_options: Default::default(),
targets: &[Some(wgpu::TextureFormat::Rgba8Unorm.into())],
}),
multiview: None,
cache: None,
});
let buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: None,
size: std::mem::size_of::<f32>() as wgpu::BufferAddress,
usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST,
mapped_at_creation: false,
});
let bind_group = device.create_bind_group(&wgpu::BindGroupDescriptor {
label: None,
layout: &bind_group_layout,
entries: &[wgpu::BindGroupEntry {
binding: 0,
resource: buffer.as_entire_binding(),
}],
});
Self {
pipeline,
buffer,
bind_group,
start: Instant::now(),
}
}
fn render(
&mut self,
queue: &wgpu::Queue,
encoder: &mut wgpu::CommandEncoder,
target: &wgpu::TextureView,
) {
queue.write_buffer(
&self.buffer,
0,
&self.start.elapsed().as_secs_f32().to_ne_bytes(),
);
let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: None,
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: target,
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: None,
timestamp_writes: None,
occlusion_query_set: None,
});
render_pass.set_pipeline(&self.pipeline);
render_pass.set_bind_group(0, &self.bind_group, &[]);
render_pass.draw(0..3, 0..1);
}
}
================================================
FILE: examples/src/wgpu_frame_images/triangle.wgsl
================================================
@group(0) @binding(0) var<uniform> time: f32;
struct VertexOutput {
@builtin(position) position: vec4<f32>,
@location(0) color: vec4<f32>,
}
@vertex fn vs_main(@builtin(vertex_index) vertex_index: u32) -> VertexOutput {
let x = f32(i32(vertex_index) - 1);
let y = f32(i32(vertex_index & 1u) * 2 - 1);
// A spinning triangle is better than a static triangle
let cos_theta = cos(time / 2);
let sin_theta = sin(time / 2);
let rotation_matrix = mat2x2<f32>(
cos_theta, -sin_theta,
sin_theta, cos_theta
);
var pos = vec2<f32>(x, y);
let scale = 0.75 + sin(time / 5) * 0.25;
pos = rotation_matrix * pos * scale;
// And slowly rotate through colors to make it visually interesting
let offset = f32(vertex_index) * 0.5;
let r = 0.5 + 0.5 * sin(time + offset);
let g = 0.5 + 0.5 * sin(time * 0.8 + offset + 4.0);
let b = 0.5 + 0.5 * sin(time * 1.2 + offset + 8.0);
let color = vec4<f32>(r, g, b, 1.0);
var result: VertexOutput;
result.position = vec4<f32>(rotation_matrix * pos * scale, 0.0, 1.0);
result.color = color;
return result;
}
@fragment fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
return in.color;
}
================================================
FILE: examples/src/zones/mod.rs
================================================
use rand::rngs::ThreadRng;
use rand::{Rng, RngCore};
use std::thread::sleep;
use std::time::Duration;
use tracy_client::{frame_mark, span, Client};
pub fn main() {
Client::start();
let mut rng = rand::thread_rng();
for _ in 0..50 {
simulate_physics(&mut rng);
simulate_rendering(&mut rng);
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(1..50)));
// This marks the boundary between two continuous frames
frame_mark();
}
}
fn simulate_physics(rng: &mut ThreadRng) {
// This zone starts immediately, and ends when zone is dropped
let zone = span!("Physics");
// Zones can have custom colours!
zone.emit_color(0xFF0000);
for name in ["Cow", "Pig", "Player", "Robot"] {
// Let's imagine these names are dynamic
// To mark zones for them, we need to use a different method which temporarily allocates a zone location
let zone = Client::running().unwrap().span_alloc(
Some(name),
"perform_physics",
"physics.rs",
123,
0,
);
zone.emit_value(rng.next_u64()); // entity ID? Who knows!
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(5..20)));
if rng.gen_bool(0.15) {
let zone = span!("Collision");
// Zones can have arbitrary text!
zone.emit_text("Collided against a wall");
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(5..20)));
}
}
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(1..20)));
}
fn simulate_rendering(rng: &mut ThreadRng) {
// This zone starts immediately, and ends when zone is dropped
let zone = span!("Rendering");
// Zones can have custom colours!
zone.emit_color(0x00FF00);
for _ in 0..rng.gen_range(1..10) {
if rng.gen_bool(0.50) {
let zone = span!("Mesh");
zone.emit_color(rng.gen_range(0x000000..0xFFFFFF));
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(1..15)));
} else {
// Sometimes let's not mark it, just to show that zones don't have to next to eachother
// simulate doing some work
sleep(Duration::from_millis(rng.gen_range(1..15)));
}
}
}
================================================
FILE: make_sys.sh
================================================
#!/usr/bin/env bash
# NOTE: this script is only intended to be run on CI.
set -xe
export PATH="$HOME/.cargo/bin/":"$PATH"
if [ $# -eq 0 ]; then
LAST_RELEASE=($(curl -s "https://api.github.com/repos/wolfpld/tracy/releases/latest" \
| jq -r '"\(.tag_name)\n\(.tarball_url)"'))
else
LAST_RELEASE=($(curl -s "https://api.github.com/repos/wolfpld/tracy/releases/tags/$1" \
| jq -r '"\(.tag_name)\n\(.tarball_url)"'))
fi
TAG="${LAST_RELEASE[0]}"
TARBALL="${LAST_RELEASE[1]}"
DESTINATION=/tmp/tracy-$TAG # could use mktemp, but unnecessary complexity.
echo "tracy-tag=$TAG" >> "${GITHUB_OUTPUT:-/dev/stdout}"
mkdir -p "$DESTINATION"
curl -sL "$TARBALL" -o - | tar -f - -zxC "$DESTINATION"
BASEDIR=("$DESTINATION"/*)
rm -rf "tracy-client-sys/tracy/"
cp -r "$BASEDIR/public" "tracy-client-sys/tracy"
cp "$BASEDIR/LICENSE" "tracy-client-sys/tracy/"
COMMON_BINDGEN_PARAMS=(
"tracy-client-sys/tracy/tracy/TracyC.h"
"--disable-header-comment"
"--"
"-DTRACY_ENABLE"
)
bindgen -o "tracy-client-sys/src/generated.rs" \
--rust-target 1.70.0 \
--allowlist-function='.*[Tt][Rr][Aa][Cc][Yy].*' \
--allowlist-type='.*[Tt][Rr][Aa][Cc][Yy].*' \
--blocklist-type='TracyCLockCtx' \
${COMMON_BINDGEN_PARAMS[@]}
bindgen -o "tracy-client-sys/src/generated_manual_lifetime.rs" \
--rust-target 1.70.0 \
--allowlist-function='___tracy_startup_profiler' \
--allowlist-function='___tracy_shutdown_profiler' \
${COMMON_BINDGEN_PARAMS[@]} \
-DTRACY_MANUAL_LIFETIME
bindgen -o "tracy-client-sys/src/generated_fibers.rs" \
--rust-target 1.70.0 \
--allowlist-function='___tracy_fiber_enter' \
--allowlist-function='___tracy_fiber_leave' \
${COMMON_BINDGEN_PARAMS[@]} \
-DTRACY_FIBERS
# The space after type avoids hitting members called "type".
sed -i 's/pub type /type /g' 'tracy-client-sys/src/generated.rs'
# Avoid running the other steps if we haven't really updated tracy (e.g. if bindgen/rustfmt version
# changed)
if ! git diff --quiet "tracy-client-sys/tracy"; then
echo "tracy-changed=true" >> "${GITHUB_OUTPUT:-/dev/stdout}"
else
exit 0
fi
CURRENT_SYS_VERSION=$(sed -n 's/^version = "\(.*\)" # AUTO-BUMP$/\1/p' tracy-client-sys/Cargo.toml)
CURRENT_CLIENT_VERSION=$(sed -n 's/^version = "\(.*\)" # AUTO-BUMP$/\1/p' tracy-client/Cargo.toml)
CURRENT_TRACING_VERSION=$(sed -n 's/^version = "\(.*\)"$/\1/p' tracing-tracy/Cargo.toml)
SYS_MAJOR=$(echo "$CURRENT_SYS_VERSION" | sed -nr 's,([0-9]+)\.[0-9]+\.[0-9]+,\1,p')
SYS_MINOR=$(echo "$CURRENT_SYS_VERSION" | sed -nr 's,[0-9]+\.([0-9]+)\.[0-9]+,\1,p')
NEXT_SYS_MINOR=$(echo "$SYS_MINOR" | awk '{print $0+1}')
NEXTNEXT_SYS_MINOR=$(echo "$NEXT_SYS_MINOR" | awk '{print $0+1}')
SYS_PATCH=$(echo "$CURRENT_SYS_VERSION" | sed -nr 's,[0-9]+\.[0-9]+\.([0-9]+),\1,p')
CLIENT_MAJOR=$(echo "$CURRENT_CLIENT_VERSION" | sed -nr 's,([0-9]+)\.[0-9]+\.[0-9]+,\1,p')
CLIENT_MINOR=$(echo "$CURRENT_CLIENT_VERSION" | sed -nr 's,[0-9]+\.([0-9]+)\.[0-9]+,\1,p')
CLIENT_PATCH=$(echo "$CURRENT_CLIENT_VERSION" | sed -nr 's,[0-9]+\.[0-9]+\.([0-9]+),\1,p')
NEXT_CLIENT_PATCH=$(echo "$CLIENT_PATCH" | awk '{print $0+1}')
NEXT_SYS_VERSION="$SYS_MAJOR.$NEXT_SYS_MINOR.0"
NEXTNEXT_SYS_VERSION="$SYS_MAJOR.$NEXTNEXT_SYS_MINOR.0"
NEXT_CLIENT_VERSION="$CLIENT_MAJOR.$CLIENT_MINOR.$NEXT_CLIENT_PATCH"
# Adjust the table in the README file…
sed -i "/^<!-- AUTO-UPDATE -->$/i $(printf "| %-6s | %-15s | %-12s | %-13s |" "$TAG" "$NEXT_SYS_VERSION" "$NEXT_CLIENT_VERSION" "$CURRENT_TRACING_VERSION")" \
README.mkd
# …the version in tracy-client-sys…
sed -i "s/^\(version =\) \".*\" \(# AUTO-BUMP\)$/\1 \"$NEXT_SYS_VERSION\" \2/" \
tracy-client-sys/Cargo.toml
# …and the versions in tracy-client.
sed -i "s/^\(version =\) \".*\" \(# AUTO-BUMP\)$/\1 \"$NEXT_CLIENT_VERSION\" \2/" \
tracy-client/Cargo.toml
sed -i "s/^\(version = \".*,\) <.*\" \(# AUTO-UPDATE\)$/\1 <$NEXTNEXT_SYS_VERSION\" \2/" \
tracy-client/Cargo.toml
# Make a commit that we'll PR
NAME=tracy-client-sys-auto-update[bot]
MAIL="GitHub <noreply@github.com>"
git add tracy-client-sys tracy-client/Cargo.toml README.mkd
git -c user.name="$NAME" -c user.email="$MAIL" commit -m "Update Tracy client bindings to $TAG"
================================================
FILE: tracing-tracy/Cargo.toml
================================================
[package]
name = "tracing-tracy"
version = "0.11.4"
authors = ["Simonas Kazlauskas <tracing-tracy@kazlauskas.me>"]
license.workspace = true
edition.workspace = true
rust-version.workspace = true
readme = "README.mkd"
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/tracing-tracy"
description = """
Inspect tracing-enabled Rust applications with Tracy
"""
[lib]
harness = false
bench = true
[dependencies]
tracing-core = { version = "0.1", default-features = false, features = ["std"] }
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "registry"] }
client = { package = "tracy-client", path = "../tracy-client", version = ">=0.17.0,<0.19.0", default-features = false }
[dev-dependencies]
tracing = { version = "0.1", default-features = false, features = ["std"] }
tokio = { version = "1", features = ["full"] }
tracing-attributes = { version = "0.1"}
tracing-futures = { version = "0.2" }
futures = "0.3"
criterion = "0.5"
[features]
# Refer to FEATURES.mkd for documentation on features.
default = [ "enable", "system-tracing", "context-switch-tracing", "sampling", "code-transfer",
"broadcast", "callstack-inlines", "crash-handler" ]
broadcast = ["client/broadcast"]
code-transfer = ["client/code-transfer"]
context-switch-tracing = ["client/context-switch-tracing"]
enable = ["client/enable"]
fibers = ["client/fibers"]
timer-fallback = ["client/timer-fallback"]
ondemand = ["client/ondemand"]
only-ipv4 = ["client/only-ipv4"]
only-localhost = ["client/only-localhost"]
sampling = ["client/sampling"]
system-tracing = ["client/system-tracing"]
callstack-inlines = ["client/callstack-inlines"]
manual-lifetime = ["client/manual-lifetime"]
delayed-init = ["client/delayed-init"]
flush-on-exit = ["client/flush-on-exit"]
demangle = ["client/demangle"]
verify = ["client/verify"]
debuginfod = ["client/debuginfod"]
crash-handler = ["client/crash-handler"]
[package.metadata.docs.rs]
all-features = true
================================================
FILE: tracing-tracy/src/config.rs
================================================
use client::Client;
use tracing_subscriber::fmt::format::DefaultFields;
use tracing_subscriber::fmt::FormatFields;
/// Configuration of the [`TracyLayer`](super::TracyLayer) behaviour.
///
/// For most users [`DefaultConfig`] is going to be a good default choice, however advanced users
/// can implement this trait manually to override the formatter used or to otherwise modify the
/// behaviour of the `TracyLayer`.
///
/// # Examples
///
/// ```
/// use tracing_subscriber::fmt::format::DefaultFields;
///
/// struct TracyLayerConfig {
/// fmt: DefaultFields,
/// }
/// impl tracing_tracy::Config for TracyLayerConfig {
/// type Formatter = DefaultFields;
/// fn formatter(&self) -> &Self::Formatter {
/// &self.fmt
/// }
/// // The boilerplate ends here
///
/// /// Collect 32 frames in stack traces.
/// fn stack_depth(&self, _: &tracing::Metadata) -> u16 {
/// 32
/// }
///
/// /// Do not format fields into zone names.
/// fn format_fields_in_zone_name(&self) -> bool {
/// false
/// }
///
/// // etc.
/// }
/// ```
///
/// With this configuration `TracyLayer` will collect some call stacks and the formatting of the
/// zone names is different from the `DefaultConfig`.
pub trait Config {
type Formatter: for<'writer> FormatFields<'writer> + 'static;
/// Use a custom field formatting implementation.
fn formatter(&self) -> &Self::Formatter;
/// Specify the maximum number of stack frames that will be collected.
///
/// Note that enabling callstack collection can and will introduce a non-trivial overhead at
/// every instrumentation point. Specifying 0 frames will disable stack trace collection.
///
/// Default implementation returns `0`.
fn stack_depth(&self, metadata: &tracing_core::Metadata<'_>) -> u16 {
let _ = metadata;
0
}
/// Specify whether or not to include tracing span fields in the tracy zone name, or to emit
/// them as zone text.
///
/// The former enables zone analysis along unique span field invocations, while the latter
/// aggregates every invocation of a given span into a single zone, irrespective of field
/// values.
///
/// Default implementation returns `true`.
fn format_fields_in_zone_name(&self) -> bool {
true
}
/// Apply handling for errors detected by the [`TracyLayer`](super::TracyLayer).
///
/// Fundamentally the way the tracing crate and the Tracy profiler work are somewhat
/// incompatible in certain ways. For instance, a `tracing::Span` can be created on one
/// thread and moved to another, where it is cleaned up. Tracy on the other hand expects that
/// its eqvivalent concept of zone remains entirely within a thread.
///
/// Another example a limitation in `Tracy` where the message length or zone name cannot exceed
/// a certain (low) limit of bytes.
///
/// Although `tracing_tracy` does it best to paper over these sorts of differences, it can’t
/// always make them invisible. In certain cases detecting these sorts of issues is
/// straightforward, and it is when `tracing_tracy` will invoke this method to enable users to
/// report the issues in whatever way they wish to.
///
/// By default a message coloured in red is emitted to the tracy client.
fn on_error(&self, client: &Client, error: &'static str) {
client.color_message(error, 0xFF000000, 0);
}
}
/// A default configuration of the [`TracyLayer`](super::TracyLayer).
///
/// This type does not allow for any adjustment of the configuration. In order to customize
/// the behaviour of the layer implement the [`Config`] trait for your own type.
#[derive(Default)]
pub struct DefaultConfig(DefaultFields);
impl Config for DefaultConfig {
type Formatter = DefaultFields;
fn formatter(&self) -> &Self::Formatter {
&self.0
}
}
================================================
FILE: tracing-tracy/src/lib.rs
================================================
//! Collect [Tracy] profiles in tracing-enabled applications.
//!
//! Assuming the application is well instrumented, this should in practice be a very low effort way
//! to gain great amounts of insight into an application performance.
//!
//! Note, however that Tracy is ultimately a profiling, not an observability, tool. As thus, some
//! of tracing concepts cannot be represented well by Tracy. For instance, out-of-order span
//! entries and exits, are not supported, and neither are spans that are entered and exited on
//! different threads. This crate will attempt to mitigate the problems and retain trace validity
//! at the cost of potentially invalid data. When such a mitigation occurs, trace will contain a
//! message with a note about the problem.
//!
//! Some other caveats to keep in mind:
//!
//! * Only span entries and exits are recorded;
//! * Events show up as messages in Tracy, however Tracy can struggle with large numbers of
//! messages;
//! * Some additional functionality such as plotting and memory allocation profiling is only
//! available as part of the [tracy-client](client) crate.
//!
//! # Examples
//!
//! The most basic way to setup the tracy subscriber globally is as follows:
//!
//! ```rust
//! use tracing_subscriber::layer::SubscriberExt;
//!
//! tracing::subscriber::set_global_default(
//! tracing_subscriber::registry().with(tracing_tracy::TracyLayer::default())
//! ).expect("setup tracy layer");
//! ```
//!
//! # Important note
//!
//! Depending on the configuration Tracy may broadcast discovery packets to the local network and
//! expose the data it collects in the background to that same network. Traces collected by Tracy
//! may include source and assembly code as well.
//!
//! As thus, you may want make sure to only enable the `tracing-tracy` crate conditionally, via the
//! `enable` feature flag provided by this crate.
//!
//! [Tracy]: https://github.com/wolfpld/tracy
//!
//! # Features
//!
//! The following crate features are provided to customize the functionality of the Tracy client:
//!
#![doc = include_str!("../FEATURES.mkd")]
use client::{Client, Span};
pub use config::{Config, DefaultConfig};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::{fmt::Write, mem};
use tracing_core::{
field::{Field, Visit},
span::{Attributes, Id, Record},
Event, Subscriber,
};
use tracing_subscriber::fmt::format::FormatFields;
use tracing_subscriber::{
layer::{Context, Layer},
registry,
};
use utils::{StrCache, StrCacheGuard, VecCell};
pub use client;
mod config;
type TracyFields<C> = tracing_subscriber::fmt::FormattedFields<<C as Config>::Formatter>;
thread_local! {
/// A stack of spans currently active on the current thread.
static TRACY_SPAN_STACK: VecCell<(Span, u64)> = const { VecCell::new() };
}
/// A tracing layer that collects data in Tracy profiling format.
///
/// # Examples
///
/// ```rust
/// use tracing_subscriber::layer::SubscriberExt;
/// tracing::subscriber::set_global_default(
/// tracing_subscriber::registry().with(tracing_tracy::TracyLayer::default())
/// ).expect("setup tracy layer");
/// ```
#[derive(Clone)]
pub struct TracyLayer<C = DefaultConfig> {
config: C,
client: Client,
}
impl<C> TracyLayer<C> {
/// Create a new `TracyLayer`.
///
/// Defaults to collecting stack traces.
#[must_use]
pub fn new(config: C) -> Self {
Self {
config,
client: Client::start(),
}
}
}
impl<C: Config> TracyLayer<C> {
fn truncate_span_to_length<'a>(
&self,
data: &'a str,
file: &str,
function: &str,
error_msg: &'static str,
) -> &'a str {
self.truncate_to_length(
// From AllocSourceLocation
usize::from(u16::MAX) - 2 - 4 - 4 - function.len() - 1 - file.len() - 1,
data,
error_msg,
)
}
fn truncate_to_length<'a>(
&self,
mut max_len: usize,
data: &'a str,
error_msg: &'static str,
) -> &'a str {
if data.len() >= max_len {
while !data.is_char_boundary(max_len) {
max_len -= 1;
}
self.config.on_error(&self.client, error_msg);
&data[..max_len]
} else {
data
}
}
}
impl Default for TracyLayer {
fn default() -> Self {
Self::new(DefaultConfig::default())
}
}
static MAX_CACHE_SIZE: AtomicUsize = AtomicUsize::new(8192);
/// Specify the maximum number of bytes used in thread local caches.
///
/// A value of zero disables the cache, while a value of [`usize::MAX`] denotes an unlimited
/// cache size.
///
/// Note: the upper bound on the cache size is respected on a best effort basis only. We make
/// no guarantees on the maximum memory used by tracing-tracy. Notably, changes to this value
/// are eventually consistent, i.e. caches are not flushed upon an update.
///
/// Defaults to `8192` per thread.
pub fn set_max_cache_size(max_bytes_used_per_thread: usize) {
MAX_CACHE_SIZE.store(max_bytes_used_per_thread, Ordering::Relaxed);
}
thread_local! {
static CACHE: StrCache = const { StrCache::new() };
}
impl<S, C> Layer<S> for TracyLayer<C>
where
S: Subscriber + for<'a> registry::LookupSpan<'a>,
C: Config + 'static,
{
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>) {
let Some(span) = ctx.span(id) else { return };
let mut extensions = span.extensions_mut();
if extensions.get_mut::<TracyFields<C>>().is_none() {
let mut fields =
TracyFields::<C>::new(CACHE.with(|cache| cache.acquire().into_inner()));
if self
.config
.formatter()
.format_fields(fields.as_writer(), attrs)
.is_ok()
{
extensions.insert(fields);
}
}
}
fn on_record(&self, id: &Id, values: &Record<'_>, ctx: Context<'_, S>) {
let Some(span) = ctx.span(id) else { return };
let mut extensions = span.extensions_mut();
if let Some(fields) = extensions.get_mut::<TracyFields<C>>() {
let _ = self.config.formatter().add_fields(fields, values);
} else {
let mut fields =
TracyFields::<C>::new(CACHE.with(|cache| cache.acquire().into_inner()));
if self
.config
.formatter()
.format_fields(fields.as_writer(), values)
.is_ok()
{
extensions.insert(fields);
}
}
}
fn on_event(&self, event: &Event, _: Context<'_, S>) {
CACHE.with(|cache| {
let mut buf = cache.acquire();
let mut visitor = TracyEventFieldVisitor {
dest: &mut buf,
first: true,
frame_mark: false,
};
event.record(&mut visitor);
if !visitor.first {
self.client.message(
self.truncate_to_length(
(u16::MAX - 1).into(),
visitor.dest,
"event message is too long and was truncated",
),
self.config.stack_depth(event.metadata()),
);
}
if visitor.frame_mark {
self.client.frame_mark();
}
});
}
fn on_enter(&self, id: &Id, ctx: Context<S>) {
let Some(span) = ctx.span(id) else { return };
let extensions = span.extensions();
let fields = extensions.get::<TracyFields<C>>();
let stack_frame = {
let metadata = span.metadata();
let file = metadata.file().unwrap_or("<not available>");
let line = metadata.line().unwrap_or(0);
let span = |name: &str| {
(
self.client.clone().span_alloc(
Some(self.truncate_span_to_length(
name,
file,
"",
"span information is too long and was truncated",
)),
"",
file,
line,
self.config.stack_depth(metadata),
),
id.into_u64(),
)
};
match fields {
None => span(metadata.name()),
Some(fields) if fields.is_empty() => span(metadata.name()),
Some(fields) if self.config.format_fields_in_zone_name() => CACHE.with(|cache| {
let mut buf = cache.acquire();
let _ = write!(buf, "{}{{{}}}", metadata.name(), fields.fields);
span(&buf)
}),
Some(fields) => {
let span = span(metadata.name());
span.0.emit_text(self.truncate_to_length(
(u16::MAX - 1).into(),
&fields.fields,
"span field values are too long and were truncated",
));
span
}
}
};
TRACY_SPAN_STACK.with(|s| {
s.push(stack_frame);
});
}
fn on_exit(&self, id: &Id, _: Context<S>) {
let stack_frame = TRACY_SPAN_STACK.with(VecCell::pop);
if let Some((span, span_id)) = stack_frame {
if id.into_u64() != span_id {
self.config.on_error(
&self.client,
"Tracing spans exited out of order! \
Trace might not be accurate for this span stack.",
);
}
drop(span);
} else {
self.config.on_error(
&self.client,
"Exiting a tracing span, but got nothing on the tracy span stack!",
);
}
}
fn on_close(&self, id: Id, ctx: Context<'_, S>) {
let Some(span) = ctx.span(&id) else { return };
if let Some(fields) = span.extensions_mut().get_mut::<TracyFields<C>>() {
let buf = mem::take(&mut fields.fields);
CACHE.with(|cache| drop(StrCacheGuard::new(cache, buf)));
};
}
}
struct TracyEventFieldVisitor<'a> {
dest: &'a mut String,
frame_mark: bool,
first: bool,
}
impl Visit for TracyEventFieldVisitor<'_> {
fn record_bool(&mut self, field: &Field, value: bool) {
match (value, field.name()) {
(_, "tracy.frame_mark") => self.frame_mark = value,
(true, _) => self.record_str(field, "true"),
(false, _) => self.record_str(field, "false"),
}
}
fn record_str(&mut self, field: &Field, value: &str) {
let name = field.name();
let alloc_always_size = name.len() + " = ".len() + value.len();
if self.first {
self.dest.reserve(alloc_always_size);
self.first = false;
} else {
self.dest.reserve(", ".len() + alloc_always_size);
self.dest.push_str(", ");
}
self.dest.push_str(name);
self.dest.push_str(" = ");
self.dest.push_str(value);
}
fn record_debug(&mut self, field: &Field, value: &dyn std::fmt::Debug) {
// FIXME: this is a very crude formatter, but we don’t have
// an easy way to do anything better...
if self.first {
self.first = false;
let _ = write!(self.dest, "{} = {value:?}", field.name());
} else {
let _ = write!(self.dest, ", {} = {value:?}", field.name());
}
}
}
#[cfg(test)]
mod tests;
#[cfg(test)]
fn main() {
if std::env::args_os().any(|p| p == std::ffi::OsStr::new("--bench")) {
tests::bench();
} else {
tests::test();
}
}
mod utils {
use crate::MAX_CACHE_SIZE;
use std::cell::{Cell, UnsafeCell};
use std::mem;
use std::mem::ManuallyDrop;
use std::ops::{Deref, DerefMut};
use std::sync::atomic::Ordering;
pub struct VecCell<T>(UnsafeCell<Vec<T>>);
impl<T> VecCell<T> {
pub const fn new() -> Self {
Self(UnsafeCell::new(Vec::new()))
}
pub fn push(&self, item: T) {
// SAFETY:
// The reference to the contents of the UnsafeCell remain strictly within this method.
// In addition, this method is not re-entrant.
unsafe { &mut *self.0.get() }.push(item);
}
pub fn pop(&self) -> Option<T> {
// SAFETY:
// The reference to the contents of the UnsafeCell remain strictly within this method.
// In addition, this method is not re-entrant.
unsafe { &mut *self.0.get() }.pop()
}
}
pub struct StrCache {
str_bufs: VecCell<String>,
total_size: Cell<usize>,
}
impl StrCache {
pub const fn new() -> Self {
Self {
str_bufs: VecCell::new(),
total_size: Cell::new(0),
}
}
pub fn acquire(&self) -> StrCacheGuard {
StrCacheGuard::new(
self,
self.str_bufs
.pop()
// TODO use inspect once 1.76 is stable
.map(|buf| {
self.total_size.set(self.total_size.get() - buf.capacity());
buf
})
.unwrap_or_else(|| String::with_capacity(64)),
)
}
fn release(&self, mut buf: String) {
let new_cache_size = self.total_size.get().saturating_add(buf.capacity());
if new_cache_size == usize::MAX {
// This is never going to happen, but if we've used the entire address space,
// don't bother adding another cache entry as this keeps the logic simpler.
return;
};
let max_size = MAX_CACHE_SIZE.load(Ordering::Relaxed);
if buf.capacity() == 0 || max_size == 0 {
return;
}
buf.clear();
self.str_bufs.push(buf);
self.total_size.set(new_cache_size);
if new_cache_size > max_size {
// SAFETY:
// Sorting is not re-entrant and VecCell does not hold active references. Since we
// hold a reference for the duration of this line only, we do not alias.
unsafe { &mut *self.str_bufs.0.get() }.sort_unstable_by_key(String::capacity);
if let Some(trimmed) = self.str_bufs.pop() {
self.total_size
.set(self.total_size.get() - trimmed.capacity());
}
}
}
}
pub struct StrCacheGuard<'a> {
cache: &'a StrCache,
buf: String,
}
impl<'a> StrCacheGuard<'a> {
pub fn new(cache: &'a StrCache, buf: String) -> Self {
Self { cache, buf }
}
pub fn into_inner(self) -> String {
let mut this = ManuallyDrop::new(self);
mem::take(&mut this.buf)
}
}
impl Deref for StrCacheGuard<'_> {
type Target = String;
fn deref(&self) -> &Self::Target {
&self.buf
}
}
impl DerefMut for StrCacheGuard<'_> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.buf
}
}
impl Drop for StrCacheGuard<'_> {
fn drop(&mut self) {
self.cache.release(mem::take(&mut self.buf));
}
}
}
================================================
FILE: tracing-tracy/src/tests.rs
================================================
use crate::{Config, DefaultConfig};
use super::TracyLayer;
use criterion::Criterion;
use futures::future::join_all;
use tracing::{debug, event, info, info_span, span, Level};
use tracing_attributes::instrument;
use tracing_subscriber::layer::SubscriberExt;
fn it_works() {
let span = span!(Level::TRACE, "a sec");
let _enter = span.enter();
event!(Level::INFO, "EXPLOSION!");
}
fn it_works_2() {
let span = span!(Level::TRACE, "2 secs");
let _enter = span.enter();
event!(
Level::INFO,
message = "DOUBLE THE EXPLOSION!",
tracy.frame_mark = true
);
}
fn multiple_entries() {
let span = span!(Level::INFO, "multiple_entries");
span.in_scope(|| {});
span.in_scope(|| {});
let span = span!(Level::INFO, "multiple_entries 2");
span.in_scope(|| span.in_scope(|| {}));
}
fn out_of_order() {
let span1 = span!(Level::INFO, "out of order exits 1");
let span2 = span!(Level::INFO, "out of order exits 2");
let span3 = span!(Level::INFO, "out of order exits 3");
let entry1 = span1.enter();
let entry2 = span2.enter();
let entry3 = span3.enter();
drop(entry2);
drop(entry3);
drop(entry1);
}
fn exit_in_different_thread() {
let span = Box::new(span!(Level::INFO, "exit in different thread"));
let entry = span.enter();
std::thread::scope(|scope| {
let thread = scope.spawn(move || drop(entry));
thread.join().unwrap();
});
}
async fn parent_task(subtasks: usize) {
info!("spawning subtasks...");
let subtasks = (1..=subtasks)
.map(|number| {
debug!(message = "creating subtask;", number);
subtask(number)
})
.collect::<Vec<_>>();
let result = join_all(subtasks).await;
debug!("all subtasks completed");
let sum: usize = result.into_iter().sum();
info!(sum);
}
#[instrument]
async fn subtask(number: usize) -> usize {
info!("sleeping in subtask {}...", number);
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
info!("sleeping in subtask {}...", number);
tokio::time::sleep(std::time::Duration::from_millis(number as _)).await;
info!("sleeping in subtask {}...", number);
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
number
}
// Test based on the spawny_things example from the tracing repository.
async fn async_futures() {
parent_task(5).await;
}
fn message_too_long() {
info!("{}", "a".repeat(u16::MAX.into()));
}
fn long_span_data() {
let data = "c".repeat(u16::MAX.into());
info_span!("some span name", "{}", data).in_scope(|| {});
}
fn span_with_fields() {
let span = span!(
Level::TRACE,
"wait",
duration = 0,
reason = "testing fields"
);
let _enter = span.enter();
}
pub(crate) fn test() {
tracing::subscriber::set_global_default(
tracing_subscriber::registry().with(TracyLayer::default()),
)
.expect("setup the subscriber");
it_works();
it_works_2();
multiple_entries();
out_of_order();
exit_in_different_thread();
message_too_long();
long_span_data();
span_with_fields();
let runtime = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.expect("tokio runtime");
runtime.block_on(async_futures());
}
#[derive(Default)]
struct CallstackConfig(DefaultConfig);
impl Config for CallstackConfig {
type Formatter = <DefaultConfig as Config>::Formatter;
fn formatter(&self) -> &Self::Formatter {
self.0.formatter()
}
fn stack_depth(&self, _: &tracing_core::Metadata<'_>) -> u16 {
100
}
}
fn benchmark_span(c: &mut Criterion) {
c.bench_function("span/callstack", |bencher| {
let layer =
tracing_subscriber::registry().with(TracyLayer::new(CallstackConfig::default()));
tracing::subscriber::with_default(layer, || {
bencher.iter(|| {
let _span =
tracing::error_span!("message", field1 = "first", field2 = "second").entered();
});
});
});
c.bench_function("span/no_callstack", |bencher| {
let layer = tracing_subscriber::registry().with(TracyLayer::default());
tracing::subscriber::with_default(layer, || {
bencher.iter(|| {
let _span =
tracing::error_span!("message", field1 = "first", field2 = "second").entered();
});
});
});
}
fn benchmark_message(c: &mut Criterion) {
c.bench_function("event/callstack", |bencher| {
let layer =
tracing_subscriber::registry().with(TracyLayer::new(CallstackConfig::default()));
tracing::subscriber::with_default(layer, || {
bencher.iter(|| {
tracing::error!(field1 = "first", field2 = "second", "message");
});
});
});
c.bench_function("event/no_callstack", |bencher| {
let layer = tracing_subscriber::registry().with(TracyLayer::default());
tracing::subscriber::with_default(layer, || {
bencher.iter(|| {
tracing::error!(field1 = "first", field2 = "second", "message");
});
});
});
}
pub(crate) fn bench() {
criterion::criterion_group!(benches, benchmark_span, benchmark_message);
benches();
Criterion::default().configure_from_args().final_summary();
}
================================================
FILE: tracy-client/Cargo.toml
================================================
[package]
name = "tracy-client"
version = "0.18.4" # AUTO-BUMP
authors = ["Simonas Kazlauskas <tracy-client@kazlauskas.me>"]
license.workspace = true
edition.workspace = true
rust-version.workspace = true
readme = "README.mkd"
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/tracy-client"
description = """
High level bindings to the client libraries for the Tracy profiler
"""
[[test]]
name = "tests"
path = "tests/tests.rs"
harness = false
[[test]]
name = "loom"
path = "tests/loom.rs"
harness = false
[[bench]]
name = "client"
path = "benches/client.rs"
harness = false
[dev-dependencies]
criterion = "0.5"
[dependencies]
once_cell = "1.19"
rustc-demangle = { version = "0.1", optional = true }
[dependencies.sys]
path = "../tracy-client-sys"
package = "tracy-client-sys"
version = ">=0.23.0, <0.29.0" # AUTO-UPDATE
default-features = false
[target.'cfg(loom)'.dependencies.loom]
version = "0.7"
[features]
# Refer to FEATURES.mkd for documentation on features.
default = [ "enable", "system-tracing", "context-switch-tracing", "sampling", "code-transfer",
"broadcast", "callstack-inlines", "crash-handler" ]
broadcast = ["sys/broadcast"]
code-transfer = ["sys/code-transfer"]
context-switch-tracing = ["sys/context-switch-tracing"]
enable = ["sys/enable"]
fibers = ["sys/fibers"]
timer-fallback = ["sys/timer-fallback"]
ondemand = ["sys/ondemand"]
only-ipv4 = ["sys/only-ipv4"]
only-localhost = ["sys/only-localhost"]
sampling = ["sys/sampling"]
system-tracing = ["sys/system-tracing"]
callstack-inlines = ["sys/callstack-inlines"]
manual-lifetime = ["sys/manual-lifetime"]
delayed-init = ["sys/delayed-init"]
flush-on-exit = ["sys/flush-on-exit"]
demangle = ["sys/demangle", "dep:rustc-demangle"]
verify = ["sys/verify"]
debuginfod = ["sys/debuginfod"]
crash-handler = ["sys/crash-handler"]
[package.metadata.docs.rs]
all-features = true
================================================
FILE: tracy-client/benches/client.rs
================================================
use criterion::{criterion_group, criterion_main, Criterion};
use tracy_client::Client;
fn client_start(c: &mut Criterion) {
let mut clients = Vec::<Client>::with_capacity(1_000_000_000);
c.bench_function("start", |b| b.iter(|| clients.push(Client::start())));
}
fn client_clone(c: &mut Criterion) {
let mut clients = Vec::<Client>::with_capacity(1_000_000_000);
let client = Client::start();
c.bench_function("clone", |b| b.iter(|| clients.push(client.clone())));
}
fn client_running(c: &mut Criterion) {
let _client = Client::start();
c.bench_function("running", |b| b.iter(Client::running));
}
fn ops_alloc(c: &mut Criterion) {
let client = Client::start();
c.bench_function("span_alloc_callstack/0", |bencher| {
bencher.iter(|| {
let _ = client
.clone()
.span_alloc(Some("hello"), "function", "file", 42, 0);
});
});
c.bench_function("span_alloc_callstack/100", |bencher| {
bencher.iter(|| {
let _ = client
.clone()
.span_alloc(Some("hello"), "function", "file", 42, 100);
});
});
}
fn ops_static(c: &mut Criterion) {
let _client = tracy_client::Client::start();
c.bench_function("span_callstack/0", |bencher| {
bencher.iter(|| {
let _ = tracy_client::span!("some_name", 0);
});
});
c.bench_function("span_callstack/100", |bencher| {
bencher.iter(|| {
let _ = tracy_client::span!("some_name", 100);
});
});
}
criterion_group!(
benches,
client_start,
client_clone,
client_running,
ops_alloc,
ops_static
);
criterion_main!(benches);
================================================
FILE: tracy-client/src/demangle.rs
================================================
//! Custom symbol demangling support.
//!
//! By default, Tracy demangles symbols using the C++ ABI, which is not fully compatible with Rust
//! symbol mangling.
//!
//! With the `demangle` feature enabled, clients must register a custom demangling function.
//! This can be done by calling the [`register_demangler!`][macro] macro with either no arguments
//! to use the [default demangler](default), or with a path to a custom demangler function. See
//! [its documentation][macro] for how to use it.
//!
//! Note that only one demangler can be registered at a time. Attempting to register multiple
//! demanglers will result in a linking failure due to multiple definitions of the underlying
//! `extern "C"` function.
//!
//! [macro]: crate::register_demangler
use std::fmt;
/// Opaque buffer used to write demangled symbols.
///
/// The only exposed API is currently [`fmt::Write`].
///
/// See [the module-level documentation](self) for more information.
pub struct Buffer(String);
impl fmt::Write for Buffer {
#[inline]
fn write_str(&mut self, s: &str) -> fmt::Result {
self.0.write_str(s)
}
#[inline]
fn write_char(&mut self, c: char) -> fmt::Result {
self.0.write_char(c)
}
}
impl Buffer {
const fn new() -> Self {
Self(String::new())
}
fn clear_on_err<T, E>(&mut self, f: impl FnOnce(&mut Self) -> Result<T, E>) -> Result<T, E> {
let r = f(self);
if r.is_err() {
self.0.clear();
}
r
}
}
/// Demangles a Rust symbol using [`rustc_demangle`].
///
/// See [the module-level documentation](self) for more information.
pub fn default(s: &str, buffer: &mut impl fmt::Write) -> fmt::Result {
let Ok(demangled) = rustc_demangle::try_demangle(s) else {
return Err(fmt::Error);
};
// Use `:#` formatting to elide the hash.
write!(buffer, "{demangled:#}")
}
/// Symbol demangler that does nothing.
///
/// See [the module-level documentation](self) for more information.
pub fn noop(_: &str, _: &mut impl fmt::Write) -> fmt::Result {
Err(fmt::Error)
}
pub(super) mod internal {
use super::Buffer;
use std::ffi::c_char;
use std::fmt::{self, Write};
use std::ptr::null;
/// Demangling glue.
pub unsafe fn implementation<F>(mangled: *const c_char, run: F) -> *const c_char
where
F: FnOnce(&str, &mut Buffer) -> fmt::Result,
{
// https://github.com/wolfpld/tracy/blob/d4a4b623968d99a7403cd93bae5247ed0735680a/public/client/TracyCallstack.cpp#L57-L67
// > The demangling function is responsible for managing memory for this string.
// > It is expected that it will be internally reused.
// > When a call to ___tracy_demangle is made, previous contents of the string memory
// > do not need to be preserved.
static mut BUFFER: Buffer = Buffer::new();
if mangled.is_null() {
return null();
}
let cstr = unsafe { std::ffi::CStr::from_ptr(mangled) };
let Ok(str) = cstr.to_str() else {
return null();
};
let buffer = unsafe { &mut *std::ptr::addr_of_mut!(BUFFER) };
buffer.0.clear();
let result = buffer.clear_on_err(|buffer| {
run(str, buffer)?;
match buffer.0.as_bytes().split_last() {
None | Some((&0, [])) => return Err(fmt::Error),
Some((_, v)) if v.contains(&0) => return Err(fmt::Error),
Some((&0, _)) => return Ok(()),
_ => (),
}
buffer.write_char('\0')?;
Ok(())
});
match result {
Ok(()) => {
debug_assert_eq!(buffer.0.as_bytes().last().copied(), Some(0));
buffer.0.as_ptr().cast()
}
Err(fmt::Error) => null(),
}
}
}
/// Registers a custom demangler function.
///
/// A [default implementation](default) for demangling Rust symbols can be registered by passing no
/// arguments.
///
/// Custom implementations can be registered by passing a function with the following signature:
/// `fn(mangled: &str, buffer: &mut tracy_client::demangle::Buffer) -> std::fmt::Result`
///
/// Custom demanglers:
/// - Must not write null bytes to the buffer.
/// - Returning `Err` or leaving the buffer unchanged will result in the symbol being displayed as-is.
///
/// See [the module-level documentation](self) for more information.
///
/// # Examples
///
/// ```
/// use tracy_client::{demangle, register_demangler};
///
/// // Register the default demangler.
/// # #[cfg(any())]
/// register_demangler!();
///
/// // Register a noop demangler.
/// # #[cfg(any())]
/// register_demangler!(demangle::noop);
///
/// // Register a custom demangler.
/// # #[cfg(any())]
/// register_demangler!(my_demangler);
///
/// fn my_demangler(s: &str, buffer: &mut demangle::Buffer) -> std::fmt::Result {
/// // Custom demangling logic...
/// use std::fmt::Write;
/// write!(buffer, "{s}")?;
/// Ok(())
/// }
/// ```
#[macro_export]
macro_rules! register_demangler {
() => {
$crate::register_demangler!($crate::internal::demangle::default);
};
($path:path) => {
const _: () = {
#[no_mangle]
unsafe extern "C" fn ___tracy_demangle(
mangled: *const std::ffi::c_char,
) -> *const std::ffi::c_char {
unsafe { $crate::internal::demangle::implementation(mangled, $path) }
}
};
};
}
================================================
FILE: tracy-client/src/frame.rs
================================================
use crate::Client;
/// A non-continuous frame region.
///
/// Create with the [`Client::non_continuous_frame`] function.
pub struct Frame(Client, FrameName);
/// A name for secondary and non-continuous frames.
///
/// Create with the [`frame_name!`](crate::frame_name) macro.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct FrameName(pub(crate) &'static str);
impl FrameName {
/// Construct a `FrameName` dynamically, leaking the provided String.
///
/// You should call this function once for a given name, and store the returned `FrameName` for
/// continued use, to avoid rapid memory use growth. Whenever possible, prefer the
/// [`frame_name!`](crate::frame_name) macro, which takes a literal name and doesn't leak
/// memory.
///
/// The resulting value may be used as an argument for the the [`Client::secondary_frame_mark`]
/// and [`Client::non_continuous_frame`] methods.
#[must_use]
pub fn new_leak(name: String) -> Self {
#[cfg(feature = "enable")]
{
// Ensure the name is null-terminated.
let mut name = name;
name.push('\0');
// Drop excess capacity by converting into a boxed str, then leak.
let name = Box::leak(name.into_boxed_str());
Self(name)
}
#[cfg(not(feature = "enable"))]
{
drop(name);
Self("\0")
}
}
}
/// Instrumentation for global frame indicators.
impl Client {
/// Indicate that rendering of a continuous frame has ended.
///
/// # Examples
///
/// In a traditional rendering scenarios a frame mark should be inserted after a buffer swap.
///
/// ```
/// use tracy_client::Client;
/// # fn swap_buffers() {}
/// # let client = tracy_client::Client::start();
/// // loop {
/// // ...
/// swap_buffers();
/// Client::running().expect("client must be running").frame_mark();
/// // }
/// ```
pub fn frame_mark(&self) {
#[cfg(feature = "enable")]
unsafe {
let () = sys::___tracy_emit_frame_mark(std::ptr::null());
}
}
/// Indicate that rendering of a secondary (named) continuous frame has ended.
///
/// # Examples
///
/// Much like with the primary frame mark, the secondary (named) frame mark should be inserted
/// after some continuously repeating operation finishes one iteration of its processing.
///
/// ```
/// use tracy_client::frame_name;
/// # fn physics_tick() {}
/// # let client = tracy_client::Client::start();
/// // loop {
/// // ...
/// physics_tick();
/// tracy_client::Client::running()
/// .expect("client must be running")
/// .secondary_frame_mark(frame_name!("physics"));
/// // }
/// ```
pub fn secondary_frame_mark(&self, name: FrameName) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: We ensured that the name would be null-terminated.
let () = sys::___tracy_emit_frame_mark(name.0.as_ptr().cast());
}
}
/// Indicate that a processing of a non-continuous frame has begun.
///
/// Dropping the returned [`Frame`] will terminate the non-continuous frame.
///
/// # Examples
///
/// ```
/// use tracy_client::frame_name;
/// # let client = tracy_client::Client::start();
/// let _guard = tracy_client::Client::running()
/// .expect("client must be running")
/// .non_continuous_frame(frame_name!("a frame"));
/// ```
#[must_use]
pub fn non_continuous_frame(&self, name: FrameName) -> Frame {
#[cfg(feature = "enable")]
unsafe {
// SAFE: We ensure that the name would be null-terminated.
let () = sys::___tracy_emit_frame_mark_start(name.0.as_ptr().cast());
}
Frame(self.clone(), name)
}
/// Emits an image of a frame.
///
/// The following restrictions apply:
/// - The image must be in RGBA format.
/// - The image width and height must be divisible by four.
/// - The image data must be less than 256 KB, and should be as small as
/// possible.
///
/// The offset indicates how many frames in the past the image was captured.
/// For example, an offset of 1 would associate the image with the previous
/// call to [`frame_mark`](Client::frame_mark).
///
/// The `flip` parameter indicates that the image should be flipped before
/// displaying, for example if the image is an OpenGL texture.
pub fn frame_image(&self, image: &[u8], width: u16, height: u16, offset: u8, flip: bool) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: Tracy copies the data before returning.
let ptr = image.as_ptr();
let () = sys::___tracy_emit_frame_image(ptr.cast(), width, height, offset, flip as i32);
}
}
}
/// Construct a [`FrameName`].
///
/// The resulting value may be used as an argument for the the [`Client::secondary_frame_mark`] and
/// [`Client::non_continuous_frame`] methods. The macro can be used in a `const` context.
#[macro_export]
macro_rules! frame_name {
($name: literal) => {{
unsafe { $crate::internal::create_frame_name(concat!($name, "\0")) }
}};
}
impl Drop for Frame {
fn drop(&mut self) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: We ensure that thena me would be null-terminated. We also still have an owned
// Client handle.
let () = sys::___tracy_emit_frame_mark_end(self.1 .0.as_ptr().cast());
std::convert::identity(&self.0);
}
}
}
/// Convenience shortcut for [`Client::frame_mark`] on the current client.
///
/// # Panics
///
/// - If a `Client` isn't currently running.
pub fn frame_mark() {
Client::running()
.expect("frame_mark! without a running Client")
.frame_mark();
}
/// Convenience shortcut for [`Client::frame_image`] on the current client.
pub fn frame_image(image: &[u8], width: u16, height: u16, offset: u8, flip: bool) {
Client::running()
.expect("frame_image without a running Client")
.frame_image(image, width, height, offset, flip);
}
/// Convenience macro for [`Client::secondary_frame_mark`] on the current client.
///
/// # Panics
///
/// - If a `Client` isn't currently running.
#[macro_export]
macro_rules! secondary_frame_mark {
($name: literal) => {{
$crate::Client::running()
.expect("secondary_frame_mark! without a running Client")
.secondary_frame_mark($crate::frame_name!($name))
}};
}
/// Convenience macro for [`Client::non_continuous_frame`] on the current client.
///
/// # Panics
///
/// - If a `Client` isn't currently running.
#[macro_export]
macro_rules! non_continuous_frame {
($name: literal) => {{
$crate::Client::running()
.expect("non_continuous_frame! without a running Client")
.non_continuous_frame($crate::frame_name!($name))
}};
}
================================================
FILE: tracy-client/src/gpu.rs
================================================
use std::{
convert::TryInto,
sync::{Arc, Mutex},
};
use crate::{Client, SpanLocation};
#[repr(u8)]
/// The API label associated with the given gpu context. The list here only includes
/// APIs that are currently supported by Tracy's own gpu implementations.
//
// Copied from `tracy-client-sys/tracy/common/TracyQueue.hpp:391`. Comment on enum states
// that the values are stable, due to potential serialization issues, so copying this enum
// shouldn't be a problem.
pub enum GpuContextType {
/// Stand in for other types of contexts.
Invalid = 0,
/// An OpenGL context
OpenGL = 1,
/// A Vulkan context
Vulkan = 2,
/// An OpenCL context
OpenCL = 3,
/// A D3D12 context.
Direct3D12 = 4,
/// A D3D11 context.
Direct3D11 = 5,
}
/// Context for creating gpu spans.
///
/// Generally corresponds to a single hardware queue.
///
/// The flow of creating and using gpu context generally looks like this:
///
/// ```rust,no_run
/// # let client = tracy_client::Client::start();
/// // The period of the gpu clock in nanoseconds, as provided by your GPU api.
/// // This value corresponds to 1GHz.
/// let period: f32 = 1_000_000_000.0;
///
/// // GPU API: Record writing a timestamp and resolve that to a mappable buffer.
/// // GPU API: Submit the command buffer writing the timestamp.
/// // GPU API: Immediately block until the submission is finished.
/// // GPU API: Map buffer, get timestamp value.
/// let starting_timestamp: i64 = /* whatever you get from this timestamp */ 0;
///
/// // Create the gpu context
/// let gpu_context = client.new_gpu_context(
/// Some("MyContext"),
/// tracy_client::GpuContextType::Vulkan,
/// starting_timestamp,
/// period
/// ).unwrap();
///
/// // Now you have some work that you want to time on the gpu.
///
/// // GPU API: Record writing a timestamp before the work.
/// let mut span = gpu_context.span_alloc("MyGpuSpan1", "My::Work", "myfile.rs", 12).unwrap();
///
/// // GPU API: Record work.
///
/// // GPU API: Record writing a timestamp after the work.
/// span.end_zone();
///
/// // Some time later, once the written timestamp values are available on the cpu.
/// # let (starting_timestamp, ending_timestamp) = (0, 0);
///
/// span.upload_timestamp_start(starting_timestamp);
/// span.upload_timestamp_end(ending_timestamp);
/// ```
#[derive(Clone)]
pub struct GpuContext {
#[cfg(feature = "enable")]
_client: Client,
#[cfg(feature = "enable")]
value: u8,
#[cfg(feature = "enable")]
span_freelist: Arc<Mutex<Vec<u16>>>,
_private: (),
}
#[cfg(feature = "enable")]
static GPU_CONTEXT_INDEX: Mutex<u8> = Mutex::new(0);
/// Errors that can occur when creating a gpu context.
#[derive(Debug)]
pub enum GpuContextCreationError {
/// More than `u8::MAX` contexts have been created at any point in the program.
TooManyContextsCreated,
}
impl std::fmt::Display for GpuContextCreationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"More than 255 contexts have been created at any point in the execution of this program."
)
}
}
impl std::error::Error for GpuContextCreationError {}
#[derive(Debug, PartialEq)]
enum GpuSpanState {
/// The span has been started. All gpu spans start in this state.
Started,
/// The span has been ended, either waiting for timestamp upload or with
/// timestamp upload completed.
Ended,
}
/// Span for timing gpu work.
///
/// See the [context level documentation](GpuContext) for more information on use.
///
/// If the span is dropped early, the following happens:
/// - If the span has not been ended, the span is ended. AND
/// - If the span has not had values uploaded, the span is uploaded with
/// the timestamps marking the start of the current gpu context. This
/// will put the span out of the way of other spans.
#[must_use]
pub struct GpuSpan {
#[cfg(feature = "enable")]
context: GpuContext,
#[cfg(feature = "enable")]
start_query_id: u16,
#[cfg(feature = "enable")]
end_query_id: u16,
#[cfg(feature = "enable")]
state: GpuSpanState,
_private: (),
}
/// Errors that can occur when creating a gpu span.
#[derive(Debug)]
pub enum GpuSpanCreationError {
/// More than `32767` spans are still waiting for gpu data.
TooManyPendingSpans,
}
impl std::fmt::Display for GpuSpanCreationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"Too many spans still waiting for gpu data. There may not be more than 32767 spans that are pending gpu data at once."
)
}
}
impl std::error::Error for GpuSpanCreationError {}
impl Client {
/// Creates a new GPU context.
///
/// - `name` is the name of the context.
/// - `ty` is the type (backend) of the context.
/// - `gpu_timestamp` is the gpu side timestamp the corresponds (as close as possible) to this call.
/// - `period` is the period of the gpu clock in nanoseconds (setting 1.0 means the clock is 1GHz, 1000.0 means 1MHz, etc).
///
/// See the [type level documentation](GpuContext) for more information.
///
/// # Errors
///
/// - If more than 255 contexts were made during the lifetime of the application.
pub fn new_gpu_context(
self,
name: Option<&str>,
ty: GpuContextType,
gpu_timestamp: i64,
period: f32,
) -> Result<GpuContext, GpuContextCreationError> {
#[cfg(feature = "enable")]
{
// We use a mutex to lock the context index to prevent races when using fetch_add.
//
// This prevents multiple contexts getting the same context id.
let mut context_index_guard = GPU_CONTEXT_INDEX.lock().unwrap();
if *context_index_guard == 255 {
return Err(GpuContextCreationError::TooManyContextsCreated);
}
let context = *context_index_guard;
*context_index_guard += 1;
drop(context_index_guard);
// SAFETY:
// - We know we aren't re-using the context id because of the above logic.
unsafe {
sys::___tracy_emit_gpu_new_context_serial(sys::___tracy_gpu_new_context_data {
gpuTime: gpu_timestamp,
period,
context,
flags: 0,
type_: ty as u8,
});
};
if let Some(name) = name {
// SAFETY:
// - We've allocated a context.
// - The names will copied into the command stream, so the pointers do not need to last.
unsafe {
sys::___tracy_emit_gpu_context_name_serial(
sys::___tracy_gpu_context_name_data {
context,
name: name.as_ptr().cast(),
len: name.len().try_into().unwrap_or(u16::MAX),
},
);
}
}
Ok(GpuContext {
_client: self,
value: context,
span_freelist: Arc::new(Mutex::new((0..=u16::MAX).collect())),
_private: (),
})
}
#[cfg(not(feature = "enable"))]
Ok(GpuContext { _private: () })
}
}
impl GpuContext {
#[cfg(feature = "enable")]
fn alloc_span_ids(&self) -> Result<(u16, u16), GpuSpanCreationError> {
let mut freelist = self.span_freelist.lock().unwrap();
if freelist.len() < 2 {
return Err(GpuSpanCreationError::TooManyPendingSpans);
}
// These unwraps are unreachable.
let start = freelist.pop().unwrap();
let end = freelist.pop().unwrap();
Ok((start, end))
}
/// Creates a new gpu span with the given source location.
///
/// This should be called right next to where you record the corresponding gpu timestamp. This
/// allows tracy to correctly associate the cpu time with the gpu timestamp.
///
/// # Errors
///
/// - If there are more than 32767 spans waiting for gpu data at once.
pub fn span(
&self,
span_location: &'static SpanLocation,
) -> Result<GpuSpan, GpuSpanCreationError> {
#[cfg(feature = "enable")]
{
let (start_query_id, end_query_id) = self.alloc_span_ids()?;
// SAFETY: We know that the span location is valid forever as it is 'static. `usize` will
// always be smaller than u64, so no data will be lost.
unsafe {
sys::___tracy_emit_gpu_zone_begin_serial(sys::___tracy_gpu_zone_begin_data {
srcloc: std::ptr::addr_of!(span_location.data) as usize as u64,
queryId: start_query_id,
context: self.value,
});
};
Ok(GpuSpan {
context: self.clone(),
start_query_id,
end_query_id,
state: GpuSpanState::Started,
_private: (),
})
}
#[cfg(not(feature = "enable"))]
Ok(GpuSpan { _private: () })
}
/// Creates a new gpu span with the given name, function, file, and line.
///
/// This should be called right next to where you record the corresponding gpu timestamp. This
/// allows tracy to correctly associate the cpu time with the gpu timestamp.
///
/// # Errors
///
/// - If there are more than 32767 spans waiting for gpu data at once.
pub fn span_alloc(
&self,
name: &str,
function: &str,
file: &str,
line: u32,
) -> Result<GpuSpan, GpuSpanCreationError> {
#[cfg(feature = "enable")]
{
let srcloc = unsafe {
sys::___tracy_alloc_srcloc_name(
line,
file.as_ptr().cast(),
file.len(),
function.as_ptr().cast(),
function.len(),
name.as_ptr().cast(),
name.len(),
0,
)
};
let (start_query_id, end_query_id) = self.alloc_span_ids()?;
unsafe {
sys::___tracy_emit_gpu_zone_begin_alloc_serial(sys::___tracy_gpu_zone_begin_data {
srcloc,
queryId: start_query_id,
context: self.value,
});
};
Ok(GpuSpan {
context: self.clone(),
start_query_id,
end_query_id,
state: GpuSpanState::Started,
_private: (),
})
}
#[cfg(not(feature = "enable"))]
Ok(GpuSpan { _private: () })
}
/// Begins a new manually tracked GPU span.
///
/// You can use this instead of [`GpuContext::span()`] if you'd like to track the GPU span
/// manually. `query_id` is the id of the GPU timestamp query that you had created; when the
/// GPU timestamp is ready, call [`GpuContext::upload_gpu_timestamp()`] to upload it to Tracy.
///
/// This should be called right next to where you record the corresponding GPU timestamp. This
/// allows tracy to correctly associate the cpu time with the gpu timestamp.
pub fn begin_span(&self, span_location: &'static SpanLocation, query_id: u16) {
#[cfg(feature = "enable")]
// SAFETY: We know that the span location is valid forever as it is 'static. `usize` will
// always be smaller than u64, so no data will be lost.
unsafe {
sys::___tracy_emit_gpu_zone_begin_serial(sys::___tracy_gpu_zone_begin_data {
srcloc: std::ptr::addr_of!(span_location.data) as usize as u64,
queryId: query_id,
context: self.value,
});
};
}
/// Begins a new manually tracked GPU span with the given name, function, file, and line.
///
/// You can use this instead of [`GpuContext::span()`] if you'd like to track the GPU span
/// manually.
///
/// `query_id` is the id of the GPU timestamp query that you had created; when the GPU
/// timestamp is ready, call [`GpuContext::upload_gpu_timestamp()`] to upload it to Tracy.
///
/// This should be called right next to where you record the corresponding GPU timestamp. This
/// allows tracy to correctly associate the cpu time with the gpu timestamp.
pub fn begin_span_alloc(
&self,
name: &str,
function: &str,
file: &str,
line: u32,
query_id: u16,
) {
#[cfg(feature = "enable")]
{
let srcloc = unsafe {
sys::___tracy_alloc_srcloc_name(
line,
file.as_ptr().cast(),
file.len(),
function.as_ptr().cast(),
function.len(),
name.as_ptr().cast(),
name.len(),
0,
)
};
unsafe {
sys::___tracy_emit_gpu_zone_begin_alloc_serial(sys::___tracy_gpu_zone_begin_data {
srcloc,
queryId: query_id,
context: self.value,
});
};
}
}
/// Ends a manually tracked GPU span.
///
/// Call this to end a span started with [`GpuContext::begin_span()`] or
/// [`GpuContext::begin_span_alloc()`].
///
/// `query_id` is the id of the GPU timestamp query that you had created; when the
/// GPU timestamp is ready, call [`GpuContext::upload_gpu_timestamp()`] to upload it to Tracy.
///
/// This should be called right next to where you record the corresponding GPU timestamp. This
/// allows tracy to correctly associate the cpu time with the gpu timestamp.
pub fn end_span(&self, query_id: u16) {
#[cfg(feature = "enable")]
unsafe {
sys::___tracy_emit_gpu_zone_end_serial(sys::___tracy_gpu_zone_end_data {
queryId: query_id,
context: self.value,
});
};
}
/// Uploads a GPU timestamp for a manually tracked span.
///
/// Call this to upload the ready GPU timestamp for a query corresponding to `query_id`.
pub fn upload_gpu_timestamp(&self, query_id: u16, gpu_timestamp: i64) {
#[cfg(feature = "enable")]
unsafe {
sys::___tracy_emit_gpu_time_serial(sys::___tracy_gpu_time_data {
gpuTime: gpu_timestamp,
queryId: query_id,
context: self.value,
});
};
}
/// Communicates the current GPU timestamp to Tracy.
///
/// Some GPUs (like AMD) will aggressively reset their timing when going into lower power
/// states. If your application does not continuously utilize the GPU, this will cause Tracy's
/// synchronization of CPU and GPU timestamps to immediately go out of sync, resulting in
/// broken GPU span display.
///
/// You can use this method to resynchronize CPU and GPU timestamps. Fetch the current GPU
/// timestamp, then immediately call this method. It will synchronize the given `gpu_timestamp`
/// to the CPU timestamp at the time of this call.
pub fn sync_gpu_time(&self, gpu_timestamp: i64) {
#[cfg(feature = "enable")]
unsafe {
sys::___tracy_emit_gpu_time_sync_serial(sys::___tracy_gpu_time_sync_data {
gpuTime: gpu_timestamp,
context: self.value,
});
};
}
}
impl GpuSpan {
/// Marks the end of the given gpu span. This should be called right next to where you record
/// the corresponding gpu timestamp for the end of the span. This allows tracy to correctly
/// associate the cpu time with the gpu timestamp.
///
/// Only the first time you call this function will it actually emit a gpu zone end event. Any
/// subsequent calls will be ignored.
pub fn end_zone(&mut self) {
#[cfg(feature = "enable")]
{
if self.state != GpuSpanState::Started {
return;
}
unsafe {
sys::___tracy_emit_gpu_zone_end_serial(sys::___tracy_gpu_zone_end_data {
queryId: self.end_query_id,
context: self.context.value,
});
};
self.state = GpuSpanState::Ended;
}
}
/// Supplies the GPU timestamp for the start of this span.
///
/// In order to avoid confusing Tracy, you must call
/// [`Self::upload_timestamp_start`] and [`Self::upload_timestamp_end`] in
/// monotonically increasing timestamp order. For example, if you have two
/// nested spans *outer* and *inner*, you must supply the timestamps in
/// this order: (1) *outer* start; (2) *inner* start; (3) *inner* end; (4)
/// *outer* end.
pub fn upload_timestamp_start(&self, start_timestamp: i64) {
#[cfg(feature = "enable")]
unsafe {
sys::___tracy_emit_gpu_time_serial(sys::___tracy_gpu_time_data {
gpuTime: start_timestamp,
queryId: self.start_query_id,
context: self.context.value,
});
};
}
/// Supplies the GPU timestamp for the end of this span.
///
/// In order to avoid confusing Tracy, you must call
/// [`Self::upload_timestamp_start`] and [`Self::upload_timestamp_end`] in
/// monotonically increasing timestamp order. For example, if you have two
/// nested spans *outer* and *inner*, you must supply the timestamps in this
/// order: (1) *outer* start; (2) *inner* start; (3) *inner* end; (4)
/// *outer* end.
pub fn upload_timestamp_end(&self, end_timestamp: i64) {
#[cfg(feature = "enable")]
unsafe {
sys::___tracy_emit_gpu_time_serial(sys::___tracy_gpu_time_data {
gpuTime: end_timestamp,
queryId: self.end_query_id,
context: self.context.value,
});
};
}
}
impl Drop for GpuSpan {
fn drop(&mut self) {
#[cfg(feature = "enable")]
{
match self.state {
GpuSpanState::Started => {
self.end_zone();
}
GpuSpanState::Ended => {}
}
// Put the ids back into the freelist.
let mut freelist = self.context.span_freelist.lock().unwrap();
freelist.push(self.start_query_id);
freelist.push(self.end_query_id);
drop(freelist);
}
}
}
================================================
FILE: tracy-client/src/lib.rs
================================================
#![deny(unsafe_op_in_unsafe_fn, missing_docs)]
#![cfg_attr(
not(feature = "enable"),
allow(unused_variables, unused_imports, unused_mut, dead_code)
)]
// TODO https://github.com/rust-lang/rust-clippy/issues/12017
#![allow(clippy::let_unit_value)]
//! This crate is a set of safe bindings to the client library of the [Tracy profiler].
//!
//! If you have already instrumented your application with `tracing`, consider the `tracing-tracy`
//! crate.
//!
//! [Tracy profiler]: https://github.com/wolfpld/tracy
//!
//! # Important note
//!
//! Depending on the configuration Tracy may broadcast discovery packets to the local network and
//! expose the data it collects in the background to that same network. Traces collected by Tracy
//! may include source and assembly code as well.
//!
//! As thus, you may want make sure to only enable the `tracy-client` crate conditionally, via
//! the `enable` feature flag provided by this crate.
//!
//! # Features
//!
//! The following crate features are provided to customize the functionality of the Tracy client:
//!
#![doc = include_str!("../FEATURES.mkd")]
pub use crate::frame::{frame_image, frame_mark, Frame, FrameName};
pub use crate::gpu::{
GpuContext, GpuContextCreationError, GpuContextType, GpuSpan, GpuSpanCreationError,
};
pub use crate::plot::{PlotConfiguration, PlotFormat, PlotLineStyle, PlotName};
pub use crate::span::{Span, SpanLocation};
use std::alloc;
use std::ffi::CString;
pub use sys;
mod frame;
mod gpu;
mod plot;
mod span;
mod state;
#[cfg(feature = "demangle")]
pub mod demangle;
/// /!\ /!\ Please don't rely on anything in this module T_T /!\ /!\
#[doc(hidden)]
pub mod internal {
pub use crate::{span::SpanLocation, sys};
pub use once_cell::sync::Lazy;
pub use std::any::type_name;
use std::ffi::CString;
pub use std::ptr::null;
#[cfg(feature = "demangle")]
pub mod demangle {
pub use crate::demangle::{default, internal::implementation};
}
#[inline(always)]
#[must_use]
pub fn make_span_location(
type_name: &'static str,
span_name: *const u8,
file: *const u8,
line: u32,
) -> SpanLocation {
#[cfg(feature = "enable")]
{
let function_name = CString::new(&type_name[..type_name.len() - 3]).unwrap();
SpanLocation {
data: sys::___tracy_source_location_data {
name: span_name.cast(),
function: function_name.as_ptr(),
file: file.cast(),
line,
color: 0,
},
_function_name: function_name,
}
}
#[cfg(not(feature = "enable"))]
crate::SpanLocation { _internal: () }
}
#[inline(always)]
#[must_use]
pub const unsafe fn create_frame_name(name: &'static str) -> crate::frame::FrameName {
crate::frame::FrameName(name)
}
#[inline(always)]
#[must_use]
pub const unsafe fn create_plot(name: &'static str) -> crate::plot::PlotName {
crate::plot::PlotName(name)
}
/// Safety: `name` must be null-terminated, and a `Client` must be enabled
#[inline(always)]
pub unsafe fn set_thread_name(name: *const u8) {
#[cfg(feature = "enable")]
unsafe {
let () = sys::___tracy_set_thread_name(name.cast());
}
}
}
/// A type representing an enabled Tracy client.
///
/// Obtaining a `Client` is required in order to instrument the application.
///
/// Multiple copies of a Client may be live at once. As long as at least one `Client` value lives,
/// the `Tracy` client is enabled globally. In addition to collecting information through the
/// instrumentation inserted by you, the Tracy client may automatically collect information about
/// execution of the program while it is enabled. All this information may be stored in memory
/// until a profiler application connects to the client to read the data.
///
/// Depending on the build configuration, the client may collect and make available machine
/// and source code of the application as well as other potentially sensitive information.
///
/// When all of the `Client` values are dropped, the underlying Tracy client will be shut down as
/// well. Shutting down the `Client` will discard any information gathered up to that point that
/// still hasn't been delivered to the profiler application.
pub struct Client(());
/// Instrumentation methods for outputting events occurring at a specific instant.
///
/// Data provided by this instrumentation can largely be considered to be equivalent to logs.
impl Client {
/// Output a message.
///
/// Specifying a non-zero `callstack_depth` will enable collection of callstack for this
/// message. The number provided will limit the number of call frames collected. Note that
/// enabling callstack collection introduces a non-trivial amount of overhead to this call.
pub fn message(&self, message: &str, callstack_depth: u16) {
#[cfg(feature = "enable")]
unsafe {
let stack_depth = adjust_stack_depth(callstack_depth).into();
let () =
sys::___tracy_emit_message(message.as_ptr().cast(), message.len(), stack_depth);
}
}
/// Output a message with an associated color.
///
/// Specifying a non-zero `callstack_depth` will enable collection of callstack for this
/// message. The number provided will limit the number of call frames collected. Note that
/// enabling callstack collection introduces a non-trivial amount of overhead to this call.
///
/// The colour shall be provided as RGBA, where the least significant 8 bits represent the alpha
/// component and most significant 8 bits represent the red component.
pub fn color_message(&self, message: &str, rgba: u32, callstack_depth: u16) {
#[cfg(feature = "enable")]
unsafe {
let depth = adjust_stack_depth(callstack_depth).into();
let () = sys::___tracy_emit_messageC(
message.as_ptr().cast(),
message.len(),
rgba >> 8,
depth,
);
}
}
}
impl Client {
/// Set the current thread name to the provided value.
///
/// # Panics
///
/// This function will panic if the name contains interior null characters.
pub fn set_thread_name(&self, name: &str) {
#[cfg(feature = "enable")]
unsafe {
let name = CString::new(name).unwrap();
// SAFE: `name` is a valid null-terminated string.
internal::set_thread_name(name.as_ptr().cast());
}
}
}
/// Convenience macro for [`Client::set_thread_name`] on the current client.
///
/// Note that any interior null characters terminate the name early. This is not checked for.
///
/// # Panics
///
/// - If a `Client` isn't currently running.
#[macro_export]
macro_rules! set_thread_name {
($name: literal) => {{
$crate::Client::running().expect("set_thread_name! without a running Client");
unsafe {
// SAFE: `name` is a valid null-terminated string.
$crate::internal::set_thread_name(concat!($name, "\0").as_ptr().cast())
}
}};
}
/// A profiling wrapper around another allocator.
///
/// See documentation for [`std::alloc`] for more information about global allocators.
///
/// Note that this wrapper will start up the client on the first allocation, if not enabled
/// already.
///
/// # Examples
///
/// In your executable, add:
///
/// ```rust
/// # use tracy_client::*;
/// #[global_allocator]
/// static GLOBAL: ProfiledAllocator<std::alloc::System> =
/// ProfiledAllocator::new(std::alloc::System, 100);
/// ```
pub struct ProfiledAllocator<T>(T, u16);
impl<T> ProfiledAllocator<T> {
/// Construct a new `ProfiledAllocator`.
///
/// Specifying a non-zero `callstack_depth` will enable collection of callstack for this
/// message. The number provided will limit the number of call frames collected. Note that
/// enabling callstack collection introduces a non-trivial amount of overhead to each
/// allocation and deallocation.
pub const fn new(inner_allocator: T, callstack_depth: u16) -> Self {
Self(inner_allocator, adjust_stack_depth(callstack_depth))
}
fn emit_alloc(&self, ptr: *mut u8, size: usize) {
#[cfg(feature = "enable")]
unsafe {
Client::start();
if self.1 == 0 {
let () = sys::___tracy_emit_memory_alloc(ptr.cast(), size, 1);
} else {
let () =
sys::___tracy_emit_memory_alloc_callstack(ptr.cast(), size, self.1.into(), 1);
}
}
}
fn emit_free(&self, ptr: *mut u8) {
#[cfg(feature = "enable")]
unsafe {
if self.1 == 0 {
let () = sys::___tracy_emit_memory_free(ptr.cast(), 1);
} else {
let () = sys::___tracy_emit_memory_free_callstack(ptr.cast(), self.1.into(), 1);
}
}
}
}
unsafe impl<T: alloc::GlobalAlloc> alloc::GlobalAlloc for ProfiledAllocator<T> {
unsafe fn alloc(&self, layout: alloc::Layout) -> *mut u8 {
let alloc = unsafe {
// SAFE: all invariants satisfied by the caller.
self.0.alloc(layout)
};
self.emit_alloc(alloc, layout.size());
alloc
}
unsafe fn dealloc(&self, ptr: *mut u8, layout: alloc::Layout) {
self.emit_free(ptr);
unsafe {
// SAFE: all invariants satisfied by the caller.
self.0.dealloc(ptr, layout);
}
}
unsafe fn alloc_zeroed(&self, layout: alloc::Layout) -> *mut u8 {
let alloc = unsafe {
// SAFE: all invariants satisfied by the caller.
self.0.alloc_zeroed(layout)
};
self.emit_alloc(alloc, layout.size());
alloc
}
unsafe fn realloc(&self, ptr: *mut u8, layout: alloc::Layout, new_size: usize) -> *mut u8 {
self.emit_free(ptr);
let alloc = unsafe {
// SAFE: all invariants satisfied by the caller.
self.0.realloc(ptr, layout, new_size)
};
self.emit_alloc(alloc, new_size);
alloc
}
}
/// Clamp the stack depth to the maximum supported by Tracy.
pub(crate) const fn adjust_stack_depth(depth: u16) -> u16 {
#[cfg(windows)]
{
62 ^ ((depth ^ 62) & 0u16.wrapping_sub((depth < 62) as _))
}
#[cfg(not(windows))]
{
depth
}
}
================================================
FILE: tracy-client/src/plot.rs
================================================
use crate::Client;
/// Name of a plot.
///
/// Create with the [`plot_name!`](crate::plot_name) macro.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub struct PlotName(pub(crate) &'static str);
/// The format of a plot to be shown in the Tracy profiler UI.
#[derive(Debug, Hash, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
#[non_exhaustive]
pub enum PlotFormat {
/// Values will be displayed as plain numbers. This is the default.
#[default]
Number,
/// Values will be displayed as byte counts, showing as kilobytes, megabytes, etc.
Memory,
/// Values will be shown as a percentage (with 100 being equal to 100%).
Percentage,
/// Values will be shown as watts.
Watts,
}
/// The style of lines of a plot, shown in the Tracy profiler UI.
#[derive(Debug, Hash, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
#[non_exhaustive]
pub enum PlotLineStyle {
/// Lines will be stepped (ie look like a staircase).
Stepped,
/// Lines will be smooth (interpolating a line between two values).
#[default]
Smooth,
}
/// Configuration for how a plot appears in the Tracy profiling UI.
///
/// # Examples
///
/// ```
/// # use tracy_client::PlotConfiguration;
/// // Create a red plot line.
/// let configuration = PlotConfiguration::default().fill(false).color(Some(0xFF0000));
/// ```
#[derive(Clone, PartialEq, Debug)]
pub struct PlotConfiguration {
/// The format of values on the plot.
format: PlotFormat,
/// The style of lines on the plot.
line_style: PlotLineStyle,
/// Whether the plot should be filled with a solid color below the line.
fill: bool,
/// A custom color of this plot. None means a default color will be generated by Tracy.
color: Option<u32>,
}
impl PlotConfiguration {
/// Sets the format of values on the plot.
pub fn format(mut self, format: PlotFormat) -> Self {
self.format = format;
self
}
/// Sets the style of lines on the plot.
pub fn line_style(mut self, line_style: PlotLineStyle) -> Self {
self.line_style = line_style;
self
}
/// Sets whether the plot should be filled with a solid color below the line.
pub fn fill(mut self, fill: bool) -> Self {
self.fill = fill;
self
}
/// Sets a custom color of the plot. A value of `None` will cause Tracy to create its own color.
///
/// # Examples
///
/// ```
/// # use tracy_client::PlotConfiguration;
/// // Configure the plot to be red.
/// let red = PlotConfiguration::default().color(Some(0xFF0000));
/// // Configure the plot to be green.
/// let green = PlotConfiguration::default().color(Some(0x00FF00));
/// // Configure the plot to be blue.
/// let blue = PlotConfiguration::default().color(Some(0x0000FF));
/// ```
pub fn color(mut self, color: Option<u32>) -> Self {
self.color = color;
self
}
}
impl Default for PlotConfiguration {
fn default() -> Self {
Self {
format: Default::default(),
line_style: Default::default(),
fill: true,
color: None,
}
}
}
impl PlotName {
/// Construct a `PlotName` dynamically, leaking the provided String.
///
/// You should call this function once for a given name, and store the returned `PlotName` for
/// continued use, to avoid rapid memory use growth. Whenever possible, prefer the
/// [`plot_name!`](crate::plot_name) macro, which takes a literal name and doesn't leak memory.
///
/// The resulting value may be used as an argument for the the [`Client::secondary_frame_mark`]
/// and [`Client::non_continuous_frame`] methods.
#[must_use]
pub fn new_leak(name: String) -> Self {
#[cfg(feature = "enable")]
{
// Ensure the name is null-terminated.
let mut name = name;
name.push('\0');
// Drop excess capacity by converting into a boxed str, then leak.
let name = Box::leak(name.into_boxed_str());
Self(name)
}
#[cfg(not(feature = "enable"))]
{
drop(name);
Self("\0")
}
}
}
/// Instrumentation for drawing 2D plots.
impl Client {
/// Add a point with an y-axis value of `value` to the plot named `plot_name`.
///
/// # Examples
///
/// ```
/// # let client = tracy_client::Client::start();
/// tracy_client::Client::running()
/// .expect("client must be running")
/// .plot(tracy_client::plot_name!("temperature"), 37.0);
/// ```
pub fn plot(&self, plot_name: PlotName, value: f64) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: We made sure the `plot` refers to a null-terminated string.
let () = sys::___tracy_emit_plot(plot_name.0.as_ptr().cast(), value);
}
}
/// Sets the display configuration of the plot named `plot_name`.
///
/// # Examples
///
/// ```
/// use tracy_client::{PlotConfiguration, PlotFormat};
/// # let client = tracy_client::Client::start();
/// tracy_client::Client::running()
/// .expect("client must be running")
/// .plot_config(tracy_client::plot_name!("memory"), PlotConfiguration::default().format(PlotFormat::Memory));
/// ```
pub fn plot_config(&self, plot_name: PlotName, configuration: PlotConfiguration) {
#[cfg(feature = "enable")]
{
let format = match configuration.format {
PlotFormat::Number => sys::TracyPlotFormatEnum_TracyPlotFormatNumber,
PlotFormat::Memory => sys::TracyPlotFormatEnum_TracyPlotFormatMemory,
PlotFormat::Percentage => sys::TracyPlotFormatEnum_TracyPlotFormatPercentage,
PlotFormat::Watts => sys::TracyPlotFormatEnum_TracyPlotFormatWatt,
} as std::os::raw::c_int;
let stepped = configuration.line_style == PlotLineStyle::Stepped;
let filled = configuration.fill;
let color = configuration.color.unwrap_or(0);
unsafe {
// SAFE: We made sure the `plot` refers to a null-terminated string.
let () = sys::___tracy_emit_plot_config(
plot_name.0.as_ptr().cast(),
format,
stepped.into(),
filled.into(),
color,
);
}
}
}
}
/// Construct a [`PlotName`].
///
/// The resulting value may be used as an argument for the [`Client::plot`] method. The macro can
/// be used in a `const` context.
#[macro_export]
macro_rules! plot_name {
($name: expr) => {
unsafe { $crate::internal::create_plot(concat!($name, "\0")) }
};
}
/// Convenience macro for [`Client::plot`] on the current client.
///
/// # Panics
///
/// - If a `Client` isn't currently running.
#[macro_export]
macro_rules! plot {
($name: expr, $value: expr) => {{
$crate::Client::running()
.expect("plot! without a running Client")
.plot($crate::plot_name!($name), $value)
}};
}
================================================
FILE: tracy-client/src/span.rs
================================================
use crate::{adjust_stack_depth, Client};
use std::ffi::CString;
/// A handle representing a span of execution.
///
/// The trace span will be ended when this type is dropped.
pub struct Span {
#[cfg(feature = "enable")]
client: Client,
#[cfg(feature = "enable")]
zone: sys::___tracy_c_zone_context,
#[cfg(feature = "enable")]
_no_send_sync: std::marker::PhantomData<*mut sys::___tracy_c_zone_context>,
#[cfg(not(feature = "enable"))]
_no_send_sync: std::marker::PhantomData<*mut ()>,
}
/// A statically allocated location information for a span.
///
/// Construct with the [`span_location!`](crate::span_location) macro.
pub struct SpanLocation {
#[cfg(feature = "enable")]
pub(crate) _function_name: CString,
#[cfg(feature = "enable")]
pub(crate) data: sys::___tracy_source_location_data,
#[cfg(not(feature = "enable"))]
pub(crate) _internal: (),
}
unsafe impl Send for SpanLocation {}
unsafe impl Sync for SpanLocation {}
/// Instrumentation for timed regions, spans or zones of execution.
impl Client {
/// Start a new Tracy span/zone.
///
/// In order to obtain a [`SpanLocation`] value to provide to this function use the
/// [`span_location!`](crate::span_location) macro.
///
/// Specifying a non-zero `callstack_depth` will enable collection of callstack for this
/// message. The number provided will limit the number of call frames collected. Note that
/// enabling callstack collection introduces a non-trivial amount of overhead to this call. On
/// some systems this value may be clamped to a maximum value supported by the target.
///
/// The [`span!`](crate::span!) macro is a convenience wrapper over this method.
///
/// # Example
///
/// In the following example the span is created with the location at which the
/// `span_location!` macro appears and will measure the execution of the 100ms long sleep.
///
/// ```rust
/// use tracy_client::{Client, span_location};
/// let client = Client::start();
/// {
/// let _span = client.span(span_location!("sleeping"), 100);
/// std::thread::sleep(std::time::Duration::from_millis(100));
/// } // _span ends
/// ```
#[inline]
#[must_use]
pub fn span(self, loc: &'static SpanLocation, callstack_depth: u16) -> Span {
#[cfg(feature = "enable")]
unsafe {
let zone = if callstack_depth == 0 {
sys::___tracy_emit_zone_begin(&loc.data, 1)
} else {
let stack_depth = adjust_stack_depth(callstack_depth).into();
sys::___tracy_emit_zone_begin_callstack(&loc.data, stack_depth, 1)
};
Span {
client: self,
zone,
_no_send_sync: std::marker::PhantomData,
}
}
#[cfg(not(feature = "enable"))]
Span {
_no_send_sync: std::marker::PhantomData,
}
}
/// Start a new Tracy span/zone.
///
/// This function allocates the span information on the heap until it is read out by the
/// profiler. Prefer the [`Client::span`] as a allocation-free and faster alternative when
/// possible.
///
/// Specifying a non-zero `callstack_depth` will enable collection of callstack for this
/// message. The number provided will limit the number of call frames collected. Note that
/// enabling callstack collection introduces a non-trivial amount of overhead to this call. On
/// some systems this value may be clamped to a maximum value supported by the target.
///
/// # Example
///
/// In the following example the span is created with custom span source data and will measure
/// the execution of the 100ms long sleep.
///
/// ```rust
/// use tracy_client::Client;
/// let client = Client::start();
/// {
/// let _span = client.span_alloc(Some("hello"), "my_function", "hello.rs", 42, 100);
/// std::thread::sleep(std::time::Duration::from_millis(100));
/// } // _span ends
/// ```
#[inline]
#[must_use]
pub fn span_alloc(
self,
name: Option<&str>,
function: &str,
file: &str,
line: u32,
callstack_depth: u16,
) -> Span {
#[cfg(feature = "enable")]
unsafe {
let loc = sys::___tracy_alloc_srcloc_name(
line,
file.as_ptr().cast(),
file.len(),
function.as_ptr().cast(),
function.len(),
name.map_or(std::ptr::null(), |n| n.as_ptr().cast()),
name.unwrap_or("").len(),
0,
);
let zone = if callstack_depth == 0 {
sys::___tracy_emit_zone_begin_alloc(loc, 1)
} else {
let stack_depth = adjust_stack_depth(callstack_depth).into();
sys::___tracy_emit_zone_begin_alloc_callstack(loc, stack_depth, 1)
};
Span {
client: self,
zone,
_no_send_sync: std::marker::PhantomData,
}
}
#[cfg(not(feature = "enable"))]
Span {
_no_send_sync: std::marker::PhantomData,
}
}
}
impl Span {
/// Emit a numeric value associated with this span.
pub fn emit_value(&self, value: u64) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: the only way to construct `Span` is by creating a valid tracy zone context.
let () = sys::___tracy_emit_zone_value(self.zone, value);
}
}
/// Emit some text associated with this span.
pub fn emit_text(&self, text: &str) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: the only way to construct `Span` is by creating a valid tracy zone context.
let () = sys::___tracy_emit_zone_text(self.zone, text.as_ptr().cast(), text.len());
}
}
/// Emit a color associated with this span.
///
/// The color is specified as RGB. It is most straightforward to specify them as hex literals
/// such as `0xFF0000` for red, `0x00FF00` for green or `0x0000FF` for blue.
pub fn emit_color(&self, color: u32) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: the only way to construct `Span` is by creating a valid tracy zone context.
// TODO: verify if we need to shift by 8 or not...?
let () = sys::___tracy_emit_zone_color(self.zone, color);
}
}
}
impl Drop for Span {
fn drop(&mut self) {
#[cfg(feature = "enable")]
unsafe {
// SAFE: The only way to construct `Span` is by creating a valid tracy zone context. We
// also still have an owned Client handle.
let () = sys::___tracy_emit_zone_end(self.zone);
std::convert::identity(&self.client);
}
}
}
/// Construct a <code>&'static [SpanLocation]</code>.
///
/// The returned `SpanLocation` is allocated statically and is cached between invocations. This
/// `SpanLocation` will refer to the file and line at which this macro has been invoked, as well as
/// to the item containing this macro invocation.
///
/// The resulting value may be used as an argument for the [`Client::span`] method.
///
/// # Example
///
/// ```rust
/// let location: &'static tracy_client::SpanLocation = tracy_client::span_location!("some name");
/// ```
#[macro_export]
macro_rules! span_location {
() => {{
struct S;
// String processing in `const` when, Oli?
static LOC: $crate::internal::Lazy<$crate::internal::SpanLocation> =
$crate::internal::Lazy::new(|| {
$crate::internal::make_span_location(
$crate::internal::type_name::<S>(),
$crate::internal::null(),
concat!(file!(), "\0").as_ptr(),
line!(),
)
});
&*LOC
}};
($name: expr) => {{
struct S;
// String processing in `const` when, Oli?
static LOC: $crate::internal::Lazy<$crate::internal::SpanLocation> =
$crate::internal::Lazy::new(|| {
$crate::internal::make_span_location(
$crate::internal::type_name::<S>(),
concat!($name, "\0").as_ptr(),
concat!(file!(), "\0").as_ptr(),
line!(),
)
});
&*LOC
}};
}
/// Start a new Tracy span with function, file, and line determined automatically.
///
/// # Panics
///
/// `span!` will panic if the Client isn't running at the time this macro is invoked.
///
/// # Examples
///
/// Begin a span region, which will be terminated once `_span` goes out of scope:
///
/// ```
/// use tracy_client::{Client, span};
/// # let _client = tracy_client::Client::start();
/// let _span = span!("some span");
/// ```
///
/// It is also possible to enable collection of the callstack by specifying a limit of call stack
/// frames to record:
///
/// ```
/// use tracy_client::span;
/// # let _client = tracy_client::Client::start();
/// let _span = span!("some span", 32);
/// ```
///
/// Note, however, that collecting callstack introduces a non-trivial overhead at the point of
/// instrumentation.
#[macro_export]
macro_rules! span {
() => {
$crate::Client::running()
.expect("span! without a running Client")
.span($crate::span_location!(), 0)
};
($name: expr) => {
$crate::span!($name, 0)
};
($name: expr, $callstack_depth: expr) => {{
let location = $crate::span_location!($name);
$crate::Client::running()
.expect("span! without a running Client")
.span(location, $callstack_depth)
}};
}
================================================
FILE: tracy-client/src/state.rs
================================================
use crate::Client;
/// Client initialization and lifetime management.
impl Client {
/// Start the client.
///
/// The client must be started with this function before any instrumentation is invoked
/// anywhere in the process. This function can be called multiple times to obtain multiple
/// `Client` values.
///
/// The underlying client implementation will be started up only if it wasn't already running
/// yet.
///
/// Note that when the `manual-lifetime` feature is used, it is a responsibility of the user
/// to stop `tracy` using the [`sys::___tracy_shutdown_profiler`] function. Keep in mind that
/// at the time this function is called there can be no other invocations to the tracy
/// profiler, even from other threads (or you may get a crash!)
///
/// # Example
///
/// ```rust
/// // fn main() {
/// let _client = tracy_client::Client::start();
/// // ...
/// // }
/// ```
pub fn start() -> Self {
#[cfg(not(feature = "enable"))]
return Self(());
#[cfg(all(feature = "enable", feature = "manual-lifetime"))]
return manual_lifetime::start();
#[cfg(all(feature = "enable", not(feature = "manual-lifetime")))]
return Self(());
}
/// Obtain a client handle, but only if the client is already running.
#[must_use]
pub fn running() -> Option<Self> {
if Self::is_running() {
Some(Self(()))
} else {
None
}
}
/// Is the client already running?
pub fn is_running() -> bool {
#[cfg(not(feature = "enable"))]
return true; // If the client is disabled, produce a "no-op" one so that users don’t need
// to wory about conditional use of the instrumentation in their own code.
#[cfg(all(feature = "enable", feature = "manual-lifetime"))]
return manual_lifetime::is_running();
#[cfg(all(feature = "enable", not(feature = "manual-lifetime")))]
return true; // The client is started in life-before-main (or upon first use in case of
// `delayed-init`
}
/// Is the client running and a profiler connected?
pub fn is_connected() -> bool {
#[cfg(not(feature = "enable"))]
return false;
#[cfg(feature = "enable")]
return Self::is_running() && unsafe { sys::___tracy_connected() != 0 };
}
}
impl Clone for Client {
/// A cheaper alternative to [`Client::start`] or [`Client::running`] when there is already a
/// handle handy.
fn clone(&self) -> Self {
// We already know that the state is `ENABLED`, no need to check.
Self(())
}
}
#[cfg(all(feature = "enable", feature = "manual-lifetime"))]
mod manual_lifetime {
use std::sync::atomic::Ordering;
/// Enabling `Tracy` when it is already enabled, or Disabling when it is already disabled will
/// cause applications to crash. I personally think it would be better if this was a sort-of
/// reference counted kind-of thing so you could enable as many times as you wish and disable
/// just as many times without any reprecursions. At the very least this could significantly
/// help tests.
///
/// We can also try to implement something like this ourselves. To do this we'd want to track 4
/// states that construct a following finite state machine:
///
/// ```text
/// 0 = disabled -> 1 = enabling
/// ^ v
/// 3 = disabling <- 2 = enabled
/// ```
///
/// And also include a reference count somewhere in there. Something we can throw in a static
/// would be ideal.
///
/// Alas, Tracy's extensive use of thread-local storage presents us with another problem – we must
/// start up and shut down the client within the same thread. A most straightforward soution for
/// that would be to run a separate thread that would be dedicated entirely to just starting up and
/// shutting down the profiler.
///
/// All that seems like a major pain to implement, and so we’ll punt on disabling entirely until
/// somebody comes with a good use-case warranting that sort of complexity.
#[cfg(not(loom))]
static CLIENT_STATE: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
#[cfg(loom)]
loom::lazy_static! {
static ref CLIENT_STATE: loom::sync::atomic::AtomicUsize =
loom::sync::atomic::AtomicUsize::new(0);
}
const STATE_STEP: usize = 1; // Move forward by 1 step in the FSM
const STATE_DISABLED: usize = 0;
const STATE_ENABLING: usize = STATE_DISABLED + STATE_STEP;
const STATE_ENABLED: usize = STATE_ENABLING + STATE_STEP;
#[inline(always)]
fn spin_loop() {
#[cfg(loom)]
loom::thread::yield_now();
#[cfg(not(loom))]
std::hint::spin_loop();
}
pub(super) fn start() -> super::Client {
let mut old_state = CLIENT_STATE.load(Ordering::Relaxed);
loop {
match old_state {
STATE_ENABLED => return super::Client(()),
STATE_ENABLING => {
while !is_running() {
spin_loop();
}
return super::Client(());
}
STATE_DISABLED => {
let result = CLIENT_STATE.compare_exchange_weak(
old_state,
STATE_ENABLING,
Ordering::Relaxed,
Ordering::Relaxed,
);
if let Err(next_old_state) = result {
old_state = next_old_state;
continue;
} else {
unsafe {
// SAFE: This function must not be called if the profiler has
// already been enabled. While in practice calling this function
// multiple times will only serve to trigger an assertion, we
// cannot exactly rely on this, since it is an undocumented
// behaviour and the upstream might very well just decide to invoke
// UB instead. In the case there are multiple copies of
// `tracy-client` this invariant is not actually maintained, but
// otherwise this is sound due to the `ENABLE_STATE` that we
// manage.
//
// TODO: we _could_ define `ENABLE_STATE` in the `-sys` crate...
let () = sys::___tracy_startup_profiler();
CLIENT_STATE.store(STATE_ENABLED, Ordering::Release);
return super::Client(());
}
}
}
_ => unreachable!(),
}
}
}
pub(super) fn is_running() -> bool {
return CLIENT_STATE.load(Ordering::Relaxed) == STATE_ENABLED;
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn state_transitions() {
assert_eq!(0, STATE_DISABLED);
assert_eq!(STATE_DISABLED.wrapping_add(STATE_STEP), STATE_ENABLING);
assert_eq!(STATE_ENABLING.wrapping_add(STATE_STEP), STATE_ENABLED);
}
}
}
================================================
FILE: tracy-client/tests/loom.rs
================================================
#[cfg(loom)]
mod loom {
use loom::thread;
use tracy_client::Client;
fn model<F>(f: F)
where
F: Fn() + Sync + Send + 'static,
{
#[cfg(not(loom))]
{
f()
}
#[cfg(loom)]
{
let mut builder = loom::model::Builder::new();
builder.preemption_bound = Some(3);
builder.check(f)
}
}
fn main() {
model(|| {
let client = Client::start();
assert!(Client::is_running());
drop(client);
unsafe {
___tracy_shutdown_profiler();
}
});
model(|| {
let t1 = thread::spawn(|| {
let client = Client::start();
assert!(Client::is_running());
drop(client);
});
let client = Client::start();
assert!(Client::is_running());
drop(client);
t1.join().unwrap();
unsafe {
___tracy_shutdown_profiler();
}
});
model(|| {
let t1 = thread::spawn(move || {
let client = Client::start();
assert!(Client::is_running());
let client2 = client.clone();
assert!(Client::is_running());
drop(client);
assert!(Client::is_running());
drop(client2);
});
let client = Client::start();
assert!(Client::is_running());
let client2 = client.clone();
assert!(Client::is_running());
drop(client2);
assert!(Client::is_running());
drop(client);
t1.join().unwrap();
unsafe {
___tracy_shutdown_profiler();
}
});
}
}
fn main() {
#[cfg(loom)]
loom::main();
}
================================================
FILE: tracy-client/tests/tests.rs
================================================
use std::time::Duration;
use tracy_client::*;
#[global_allocator]
static GLOBAL: ProfiledAllocator<std::alloc::System> =
ProfiledAllocator::new(std::alloc::System, 100);
fn basic_zone() {
let client = Client::start();
let span = client.span(span_location!("basic_zone"), 100);
span.emit_value(42);
span.emit_text("some text");
for i in 322..420 {
span.emit_value(i);
}
}
fn alloc_zone() {
let client = Client::start();
let span = client.span_alloc(Some("alloc_zone"), "alloc_zone", file!(), line!(), 100);
span.emit_value(42);
span.emit_color(0x00FF0000);
span.emit_text("some text");
}
fn finish_frameset() {
let client = Client::start();
for _ in 0..10 {
client.frame_mark();
}
frame_mark();
}
fn finish_secondary_frameset() {
let client = Client::start();
for _ in 0..5 {
client.secondary_frame_mark(frame_name!("secondary frame"));
}
secondary_frame_mark!("secondary frame macro");
}
fn non_continuous_frameset() {
const NON_CONTINUOUS: FrameName = frame_name!("non continuous");
let client = Client::start();
let _ = client.non_continuous_frame(NON_CONTINUOUS);
let _ = non_continuous_frame!("non continuous macro");
}
fn plot_something() {
static TEMPERATURE: PlotName = plot_name!("temperature");
let client = Client::start();
for i in 0..10 {
client.plot(TEMPERATURE, f64::from(i));
}
plot!("temperature", 42.0);
}
fn allocations() {
let mut strings = Vec::new();
for i in 0..100 {
strings.push(format!("{i:?}"));
}
}
fn fib(i: u16) -> u64 {
let span = span!();
span.emit_text(&format!("fib({i})"));
let result = match i {
0 => 0,
1 => 1,
_ => fib(i - 1) + fib(i - 2),
};
span.emit_value(result);
result
}
fn message() {
let client = Client::start();
client.message("test message", 100);
client.message("test message without stack", 0);
}
fn tls_confusion() {
let client = Client::start();
let t1 = std::thread::spawn(move || {
drop(client);
});
let _ = t1.join();
let _ = Client::start();
}
fn set_thread_name() {
let _client = Client::start();
set_thread_name!("test thread");
}
fn nameless_span() {
let client = Client::start();
let _ = span!();
let _ = client.span_alloc(None, "nameless_span", file!(), line!(), 0);
set_thread_name!("test thread");
}
fn gpu() {
let client = Client::start();
let gpu_context = client
.new_gpu_context(Some("MyContext"), GpuContextType::Vulkan, 1_000, 1.0)
.unwrap();
// cmd_buf.write_timestamp(...); to start a span
let span_loc = span_location!("MyGpuSpan1");
let mut span1 = gpu_context.span(span_loc).unwrap();
// cmd_buf.write_timestamp(...); to end a span
span1.end_zone();
// cmd_buf.write_timestamp(...); to start a second span
let mut span2 = gpu_context
.span_alloc("MyGpuSpan2", "Blah::Blah2", "myfile.rs", 14)
.unwrap();
// cmd_buf.write_timestamp(...); to end a second span
span2.end_zone();
// Some time later, when the timestamps are back
span1.upload_timestamp_start(100_000);
span1.upload_timestamp_end(110_000);
span2.upload_timestamp_start(120_000);
span2.upload_timestamp_end(130_000);
}
fn main() {
#[cfg(not(loom))]
{
basic_zone();
alloc_zone();
finish_frameset();
finish_secondary_frameset();
non_continuous_frameset();
plot_something();
message();
allocations();
tls_confusion();
nameless_span();
let thread = std::thread::spawn(|| {
let _client = Client::start();
fib(25);
});
thread.join().unwrap();
set_thread_name();
gpu();
// Sleep to give time to the client to send the data to the profiler.
std::thread::sleep(Duration::from_secs(5));
}
}
================================================
FILE: tracy-client-sys/Cargo.toml
================================================
[package]
name = "tracy-client-sys"
version = "0.28.0" # AUTO-BUMP
authors = ["Simonas Kazlauskas <tracy-client-sys@kazlauskas.me>"]
build = "build.rs"
license = "(MIT OR Apache-2.0) AND BSD-3-Clause"
edition.workspace = true
rust-version.workspace = true
readme = "README.mkd"
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/tracy-client-sys"
description = """
Low level bindings to the client libraries for the Tracy profiler
"""
[[test]]
name = "tests"
path = "tests.rs"
harness = false
required-features = ["fibers"]
[dependencies]
[target."cfg(windows)".dependencies]
windows-targets = ">=0.48, <0.53"
[build-dependencies]
cc = { version = "1.0.83", default-features = false }
[features]
# Refer to FEATURES.mkd for documentation on features.
default = [ "enable", "system-tracing", "context-switch-tracing", "sampling", "code-transfer",
"broadcast", "callstack-inlines", "crash-handler" ]
enable = []
fibers = []
system-tracing = []
context-switch-tracing = []
sampling = []
code-transfer = []
broadcast = []
only-localhost = []
only-ipv4 = []
timer-fallback = []
ondemand = []
manual-lifetime = ["delayed-init"]
delayed-init = []
callstack-inlines = []
flush-on-exit = []
demangle = []
verify = []
debuginfod = []
crash-handler = []
[package.metadata.docs.rs]
all-features = true
================================================
FILE: tracy-client-sys/build.rs
================================================
use std::{env::VarError, io::Write};
macro_rules! docs_rs {
() => {
option_env!("DOCS_RS") == Some("1")
};
}
fn link_dependencies() {
match std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
Ok("linux" | "android") => println!("cargo:rustc-link-lib=dl"),
Ok("freebsd" | "dragonfly") => println!("cargo:rustc-link-lib=c"),
Ok("windows") => println!("cargo:rustc-link-lib=user32"),
Ok(_) => {}
Err(e) => {
writeln!(::std::io::stderr(), "Unable to get target_os=`{e}`!")
.expect("could not report the error");
::std::process::exit(0xfd);
}
}
if std::env::var_os("CARGO_FEATURE_DEBUGINFOD").is_some() && !docs_rs!() {
println!("cargo:rustc-link-lib=debuginfod");
}
}
fn set_feature_defines(mut c: cc::Build) -> cc::Build {
if std::env::var_os("CARGO_FEATURE_ENABLE").is_some() {
c.define("TRACY_ENABLE", None);
}
if std::env::var_os("CARGO_FEATURE_TIMER_FALLBACK").is_some() {
c.define("TRACY_TIMER_FALLBACK", None);
}
if std::env::var_os("CARGO_FEATURE_ONDEMAND").is_some() {
c.define("TRACY_ON_DEMAND", None);
}
if std::env::var_os("CARGO_FEATURE_ONLY_LOCALHOST").is_some() {
c.define("TRACY_ONLY_LOCALHOST", None);
}
if std::env::var_os("CARGO_FEATURE_ONLY_IPV4").is_some() {
c.define("TRACY_ONLY_IPV4", None);
}
if std::env::var_os("CARGO_FEATURE_FIBERS").is_some() {
c.define("TRACY_FIBERS", None);
}
if std::env::var_os("CARGO_FEATURE_MANUAL_LIFETIME").is_some() {
c.define("TRACY_MANUAL_LIFETIME", None);
}
if std::env::var_os("CARGO_FEATURE_DELAYED_INIT").is_some() {
c.define("TRACY_DELAYED_INIT", None);
}
if std::env::var_os("CARGO_FEATURE_FLUSH_ON_EXIT").is_some() {
c.define("TRACY_NO_EXIT", None);
}
if std::env::var_os("CARGO_FEATURE_DEMANGLE").is_some() {
c.define("TRACY_DEMANGLE", None);
}
if std::env::var_os("CARGO_FEATURE_DEBUGINFOD").is_some() && !docs_rs!() {
c.define("TRACY_DEBUGINFOD", None);
}
// Note: these are inversed and check for `is_none`!
if std::env::var_os("CARGO_FEATURE_SYSTEM_TRACING").is_none() {
c.define("TRACY_NO_SYSTEM_TRACING", None);
}
if std::env::var_os("CARGO_FEATURE_CONTEXT_SWITCH_TRACING").is_none() {
c.define("TRACY_NO_CONTEXT_SWITCH", None);
}
if std::env::var_os("CARGO_FEATURE_SAMPLING").is_none() {
c.define("TRACY_NO_SAMPLING", None);
}
if std::env::var_os("CARGO_FEATURE_CODE_TRANSFER").is_none() {
c.define("TRACY_NO_CODE_TRANSFER", None);
}
if std::env::var_os("CARGO_FEATURE_BROADCAST").is_none() {
c.define("TRACY_NO_BROADCAST", None);
}
if std::env::var_os("CARGO_FEATURE_CALLSTACK_INLINES").is_none() {
c.define("TRACY_NO_CALLSTACK_INLINES", None);
}
if std::env::var_os("CARGO_FEATURE_VERIFY").is_none() {
c.define("TRACY_NO_VERIFY", None);
}
if std::env::var_os("CARGO_FEATURE_CRASH_HANDLER").is_none() {
c.define("TRACY_NO_CRASH_HANDLER", None);
}
c
}
fn build_tracy_client() {
if std::env::var_os("CARGO_FEATURE_ENABLE").is_some() {
let mut builder = set_feature_defines(cc::Build::new());
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
// Used for synchronizing access to the `dbghelp.dll` symbol helper.
// See the `dbghelp` module for more information.
builder.define("TRACY_DBGHELP_LOCK", "RustBacktraceMutex");
}
let _ = builder
.file("tracy/TracyClient.cpp")
.cargo_warnings(false)
.cpp(true);
if let Ok(tool) = builder.try_get_compiler() {
if tool.is_like_gnu() || tool.is_like_clang() {
// https://github.com/rust-lang/cc-rs/issues/855
builder.flag("-std=c++11");
}
}
let _ = builder.try_flags_from_environment("TRACY_CLIENT_SYS_CXXFLAGS");
builder.compile("libtracy-client.a");
link_dependencies();
}
}
fn read_env_and_rerun_if_changed(var: &str) -> Result<String, VarError> {
println!("cargo:rerun-if-env-changed={}", var);
std::env::var(var)
}
fn main() {
let client_lib = read_env_and_rerun_if_changed("TRACY_CLIENT_LIB");
let client_lib_path = read_env_and_rerun_if_changed("TRACY_CLIENT_LIB_PATH");
let kind = read_env_and_rerun_if_changed("TRACY_CLIENT_STATIC");
if let Ok(lib) = client_lib {
if let Ok(lib_path) = client_lib_path {
println!("cargo:rustc-link-search=native={lib_path}");
}
let mode = if kind.is_err() || kind.as_deref() == Ok("0") {
"dylib"
} else {
link_dependencies();
"static"
};
println!("cargo:rustc-link-lib={mode}={lib}");
} else {
build_tracy_client();
}
}
================================================
FILE: tracy-client-sys/src/dbghelp.rs
================================================
//! On Windows, both Tracy and Rust use the `dbghelp.dll` symbol helper to resolve symbols for stack traces.
//! `dbghelp.dll` is single threaded and requires synchronization to call any of its functions.
//!
//! The Rust standard library includes the `backtrace-rs` crate for capturing and resolving backtraces.
//! When both the standard library and the `backtrace-rs` crate are used in the same program
//! they need to synchronize their access to `dbghelp.dll`.
//! They use a shared named Windows mutex for that, which we will use as well.
//!
//! Users of Tracy (like this crate) can define the `TRACY_DBGHELP_LOCK` variable for synchronizing access to `dbghelp.dll`.
//! We set `TRACY_DBGHELP_LOCK=RustBacktraceMutex` in the build script.
//! Tracy will call [`RustBacktraceMutexInit`], [`RustBacktraceMutexLock`], and [`RustBacktraceMutexUnlock`].
//! In those functions a handle to the shared named mutex is created, the mutex is locked, and unlocked respectively.
//!
//! There is also an issue with initialization between Tracy and `backtrace-rs`.
//! In particular, the `SymInitialize` function should only be called once per process
//! and will return an error on subsequent calls.
//! Both Tracy and `backtrace-rs` ignore errors of the `SymInitialize` function,
//! so calling it multiple times is not an issue.
use std::sync::atomic::{AtomicPtr, Ordering};
// Use the `windows_targets` crate and define all the things we need ourselves to avoid a dependency on `windows`
#[allow(clippy::upper_case_acronyms)]
type BOOL = i32;
#[allow(clippy::upper_case_acronyms)]
type HANDLE = *mut core::ffi::c_void;
#[allow(clippy::upper_case_acronyms)]
type PWSTR = *mut u16;
#[allow(clippy::upper_case_acronyms)]
type PCSTR = *const u8;
#[allow(clippy::upper_case_acronyms)]
type PCWSTR = *const u16;
type WIN32_ERROR = u32;
#[repr(C)]
struct SECURITY_ATTRIBUTES {
nLength: u32,
lpSecurityDescriptor: *mut core::ffi::c_void,
bInheritHandle: BOOL,
}
const FALSE: BOOL = 0i32;
const TRUE: BOOL = 1i32;
const INFINITE: u32 = u32::MAX;
const WAIT_FAILED: u32 = 0xFFFFFFFF;
windows_targets::link!("kernel32.dll" "system" fn GetCurrentProcessId() -> u32);
windows_targets::link!("kernel32.dll" "system" fn CreateMutexA(lpmutexattributes: *const SECURITY_ATTRIBUTES, binitialowner: BOOL, lpname: PCSTR) -> HANDLE);
windows_targets::link!("kernel32.dll" "system" fn GetLastError() -> WIN32_ERROR);
windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObject(hhandle: HANDLE, dwmilliseconds: u32) -> u32);
windows_targets::link!("kernel32.dll" "system" fn ReleaseMutex(hmutex: HANDLE) -> BOOL);
windows_targets::link!("kernel32.dll" "system" fn lstrlenW(lpstring : PCWSTR) -> i32);
windows_targets::link!("kernel32.dll" "system" fn GetCurrentProcess() -> HANDLE);
windows_targets::link!("dbghelp.dll" "system" fn SymInitializeW(hprocess: HANDLE, usersearchpath: PCWSTR, finvadeprocess: BOOL) -> BOOL);
windows_targets::link!("dbghelp.dll" "system" fn SymGetSearchPathW(hprocess: HANDLE, searchpatha: PWSTR, searchpathlength: u32) -> BOOL);
windows_targets::link!("dbghelp.dll" "system" fn SymSetSearchPathW(hprocess: HANDLE, searchpatha: PCWSTR) -> BOOL);
windows_targets::link!("dbghelp.dll" "system" fn EnumerateLoadedModulesW64(hprocess: HANDLE, enumloadedmodulescallback: Option<unsafe extern "system" fn(modulename: PCWSTR, modulebase: u64, modulesize: u32, usercontext: *const core::ffi::c_void) -> BOOL>, usercontext: *const core::ffi::c_void) -> BOOL);
/// Handle to the shared named Windows mutex that synchronizes access to the `dbghelp.dll` symbol helper,
/// with the standard library and `backtrace-rs`.
/// Gets initialized by [`RustBacktraceMutexInit`],
/// and because there is no cleanup function, the handle is leaked.
static RUST_BACKTRACE_MUTEX: AtomicPtr<core::ffi::c_void> = AtomicPtr::new(std::ptr::null_mut());
#[no_mangle]
extern "C" fn RustBacktraceMutexInit() {
unsafe {
// The name is the same one that the standard library and `backtrace-rs` use
let name = format!("Local\\RustBacktraceMutex{:08X}\0", GetCurrentProcessId());
// Creates a named mutex that is shared with the standard library and `backtrace-rs`
// to synchronize access to `dbghelp.dll` functions, which are single threaded.
let mutex = CreateMutexA(std::ptr::null(), FALSE, name.as_ptr());
assert!(!mutex.is_null());
// The old value is ignored because this function is only called once,
// and normally the handle to the mutex is leaked anyway.
RUST_BACKTRACE_MUTEX.store(mutex, Ordering::Release);
}
// We initialize `dbghelp.dll` symbol handler before Tracy does,
// and add the directory of all loaded modules to the symbol search path.
// This matches the behavior of the standard library and `backtrace-rs`,
// and ensures symbols for backtraces don't break when using this crate.
// Note that changing the symbol search path doesn't affect modules that were already loaded.
init_dbghelp();
}
fn init_dbghelp() {
unsafe {
RustBacktraceMutexLock();
SymInitializeW(GetCurrentProcess(), std::ptr::null(), FALSE);
let mut paths = vec![0; 1024];
if SymGetSearchPathW(
GetCurrentProcess(),
paths.as_mut_ptr(),
paths.len().try_into().unwrap(),
) == TRUE
{
paths.truncate(lstrlenW(paths.as_ptr()).try_into().unwrap());
} else {
// As a fallback, use the current directory as a search path if `SymGetSearchPathW` fails,
// which can happen when the buffer wasn't big enough
paths = vec!['.' as u16];
}
// add the directory of all loaded modules to the symbol search path
if EnumerateLoadedModulesW64(
GetCurrentProcess(),
Some(loaded_modules_callback),
(&mut paths as *mut Vec<u16>).cast(),
) == TRUE
{
paths.push(0); // add null terminator
SymSetSearchPathW(GetCurrentProcess(), paths.as_ptr());
}
RustBacktraceMutexUnlock();
}
}
unsafe extern "system" fn loaded_modules_callback(
module_name: PCWSTR,
_module_base: u64,
_module_size: u32,
user_context: *const core::ffi::c_void,
) -> BOOL {
let path = unsafe {
std::slice::from_raw_parts(module_name, lstrlenW(module_name).try_into().unwrap())
};
let Some(last_separator) = path.iter().rposition(|&c| c == '/' as _ || c == '\\' as _) else {
return TRUE;
};
let dir = &path[..last_separator];
let paths = unsafe { &mut *user_context.cast::<Vec<u16>>().cast_mut() };
if paths.split(|&c| c == ';' as _).all(|slice| slice != dir) {
paths.push(';' as _);
paths.extend(dir);
}
TRUE // continue enumeration
}
#[no_mangle]
extern "C" fn RustBacktraceMutexLock() {
unsafe {
let mutex = RUST_BACKTRACE_MUTEX.load(Ordering::Acquire);
if !mutex.is_null() {
assert_ne!(
WaitForSingleObject(mutex, INFINITE),
WAIT_FAILED,
"{}",
GetLastError()
);
}
}
}
#[no_mangle]
extern "C" fn RustBacktraceMutexUnlock() {
unsafe {
let mutex = RUST_BACKTRACE_MUTEX.load(Ordering::Acquire);
if !mutex.is_null() {
assert_ne!(ReleaseMutex(mutex), 0, "{}", GetLastError());
}
}
}
================================================
FILE: tracy-client-sys/src/generated.rs
================================================
pub const TracyPlotFormatEnum_TracyPlotFormatNumber: TracyPlotFormatEnum = 0;
pub const TracyPlotFormatEnum_TracyPlotFormatMemory: TracyPlotFormatEnum = 1;
pub const TracyPlotFormatEnum_TracyPlotFormatPercentage: TracyPlotFormatEnum = 2;
pub const TracyPlotFormatEnum_TracyPlotFormatWatt: TracyPlotFormatEnum = 3;
type TracyPlotFormatEnum = ::std::os::raw::c_uint;
extern "C" {
pub fn ___tracy_set_thread_name(name: *const ::std::os::raw::c_char);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_source_location_data {
pub name: *const ::std::os::raw::c_char,
pub function: *const ::std::os::raw::c_char,
pub file: *const ::std::os::raw::c_char,
pub line: u32,
pub color: u32,
}
#[test]
fn bindgen_test_layout____tracy_source_location_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_source_location_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_source_location_data>(),
32usize,
"Size of ___tracy_source_location_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_source_location_data>(),
8usize,
"Alignment of ___tracy_source_location_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_source_location_data::name"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).function) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_source_location_data::function"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize },
16usize,
"Offset of field: ___tracy_source_location_data::file"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize },
24usize,
"Offset of field: ___tracy_source_location_data::line"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).color) as usize - ptr as usize },
28usize,
"Offset of field: ___tracy_source_location_data::color"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_c_zone_context {
pub id: u32,
pub active: i32,
}
#[test]
fn bindgen_test_layout____tracy_c_zone_context() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_c_zone_context> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_c_zone_context>(),
8usize,
"Size of ___tracy_c_zone_context"
);
assert_eq!(
::std::mem::align_of::<___tracy_c_zone_context>(),
4usize,
"Alignment of ___tracy_c_zone_context"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_c_zone_context::id"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).active) as usize - ptr as usize },
4usize,
"Offset of field: ___tracy_c_zone_context::active"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_time_data {
pub gpuTime: i64,
pub queryId: u16,
pub context: u8,
}
#[test]
fn bindgen_test_layout____tracy_gpu_time_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_time_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_time_data>(),
16usize,
"Size of ___tracy_gpu_time_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_time_data>(),
8usize,
"Alignment of ___tracy_gpu_time_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gpuTime) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_time_data::gpuTime"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).queryId) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_gpu_time_data::queryId"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
10usize,
"Offset of field: ___tracy_gpu_time_data::context"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_zone_begin_data {
pub srcloc: u64,
pub queryId: u16,
pub context: u8,
}
#[test]
fn bindgen_test_layout____tracy_gpu_zone_begin_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_zone_begin_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_zone_begin_data>(),
16usize,
"Size of ___tracy_gpu_zone_begin_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_zone_begin_data>(),
8usize,
"Alignment of ___tracy_gpu_zone_begin_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).srcloc) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_zone_begin_data::srcloc"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).queryId) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_gpu_zone_begin_data::queryId"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
10usize,
"Offset of field: ___tracy_gpu_zone_begin_data::context"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_zone_begin_callstack_data {
pub srcloc: u64,
pub depth: i32,
pub queryId: u16,
pub context: u8,
}
#[test]
fn bindgen_test_layout____tracy_gpu_zone_begin_callstack_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_zone_begin_callstack_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_zone_begin_callstack_data>(),
16usize,
"Size of ___tracy_gpu_zone_begin_callstack_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_zone_begin_callstack_data>(),
8usize,
"Alignment of ___tracy_gpu_zone_begin_callstack_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).srcloc) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_zone_begin_callstack_data::srcloc"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_gpu_zone_begin_callstack_data::depth"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).queryId) as usize - ptr as usize },
12usize,
"Offset of field: ___tracy_gpu_zone_begin_callstack_data::queryId"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
14usize,
"Offset of field: ___tracy_gpu_zone_begin_callstack_data::context"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_zone_end_data {
pub queryId: u16,
pub context: u8,
}
#[test]
fn bindgen_test_layout____tracy_gpu_zone_end_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_zone_end_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_zone_end_data>(),
4usize,
"Size of ___tracy_gpu_zone_end_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_zone_end_data>(),
2usize,
"Alignment of ___tracy_gpu_zone_end_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).queryId) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_zone_end_data::queryId"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
2usize,
"Offset of field: ___tracy_gpu_zone_end_data::context"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_new_context_data {
pub gpuTime: i64,
pub period: f32,
pub context: u8,
pub flags: u8,
pub type_: u8,
}
#[test]
fn bindgen_test_layout____tracy_gpu_new_context_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_new_context_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_new_context_data>(),
16usize,
"Size of ___tracy_gpu_new_context_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_new_context_data>(),
8usize,
"Alignment of ___tracy_gpu_new_context_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gpuTime) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_new_context_data::gpuTime"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).period) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_gpu_new_context_data::period"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
12usize,
"Offset of field: ___tracy_gpu_new_context_data::context"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
13usize,
"Offset of field: ___tracy_gpu_new_context_data::flags"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
14usize,
"Offset of field: ___tracy_gpu_new_context_data::type_"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_context_name_data {
pub context: u8,
pub name: *const ::std::os::raw::c_char,
pub len: u16,
}
#[test]
fn bindgen_test_layout____tracy_gpu_context_name_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_context_name_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_context_name_data>(),
24usize,
"Size of ___tracy_gpu_context_name_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_context_name_data>(),
8usize,
"Alignment of ___tracy_gpu_context_name_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_context_name_data::context"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_gpu_context_name_data::name"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
16usize,
"Offset of field: ___tracy_gpu_context_name_data::len"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_calibration_data {
pub gpuTime: i64,
pub cpuDelta: i64,
pub context: u8,
}
#[test]
fn bindgen_test_layout____tracy_gpu_calibration_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_calibration_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_calibration_data>(),
24usize,
"Size of ___tracy_gpu_calibration_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_calibration_data>(),
8usize,
"Alignment of ___tracy_gpu_calibration_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gpuTime) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_calibration_data::gpuTime"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpuDelta) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_gpu_calibration_data::cpuDelta"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
16usize,
"Offset of field: ___tracy_gpu_calibration_data::context"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ___tracy_gpu_time_sync_data {
pub gpuTime: i64,
pub context: u8,
}
#[test]
fn bindgen_test_layout____tracy_gpu_time_sync_data() {
const UNINIT: ::std::mem::MaybeUninit<___tracy_gpu_time_sync_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<___tracy_gpu_time_sync_data>(),
16usize,
"Size of ___tracy_gpu_time_sync_data"
);
assert_eq!(
::std::mem::align_of::<___tracy_gpu_time_sync_data>(),
8usize,
"Alignment of ___tracy_gpu_time_sync_data"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gpuTime) as usize - ptr as usize },
0usize,
"Offset of field: ___tracy_gpu_time_sync_data::gpuTime"
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize },
8usize,
"Offset of field: ___tracy_gpu_time_sync_data::context"
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __tracy_lockable_context_data {
_unused: [u8; 0],
}
type TracyCZoneCtx = ___tracy_c_zone_context;
extern "C" {
pub fn ___tracy_alloc_srcloc(
line: u32,
source: *const ::std::os::raw::c_char,
sourceSz: usize,
function: *const ::std::os::raw::c_char,
functionSz: usize,
color: u32,
) -> u64;
}
extern "C" {
pub fn ___tracy_alloc_srcloc_name(
line: u32,
source: *const ::std::os::raw::c_char,
sourceSz: usize,
function: *const ::std::os::raw::c_char,
functionSz: usize,
name: *const ::std::os::raw::c_char,
nameSz: usize,
color: u32,
) -> u64;
}
extern "C" {
pub fn ___tracy_emit_zone_begin(
srcloc: *const ___tracy_source_location_data,
active: i32,
) -> TracyCZoneCtx;
}
extern "C" {
pub fn ___tracy_emit_zone_begin_callstack(
srcloc: *const ___tracy_source_location_data,
depth: i32,
active: i32,
) -> TracyCZoneCtx;
}
extern "C" {
pub fn ___tracy_emit_zone_begin_alloc(srcloc: u64, active: i32) -> TracyCZoneCtx;
}
extern "C" {
pub fn ___tracy_emit_zone_begin_alloc_callstack(
srcloc: u64,
depth: i32,
active: i32,
) -> TracyCZoneCtx;
}
extern "C" {
pub fn ___tracy_emit_zone_end(ctx: TracyCZoneCtx);
}
extern "C" {
pub fn ___tracy_emit_zone_text(
ctx: TracyCZoneCtx,
txt: *const ::std::os::raw::c_char,
size: usize,
);
}
extern "C" {
pub fn ___tracy_emit_zone_name(
ctx: TracyCZoneCtx,
txt: *const ::std::os::raw::c_char,
size: usize,
);
}
extern "C" {
pub fn ___tracy_emit_zone_color(ctx: TracyCZoneCtx, color: u32);
}
extern "C" {
pub fn ___tracy_emit_zone_value(ctx: TracyCZoneCtx, value: u64);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin(arg1: ___tracy_gpu_zone_begin_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin_callstack(arg1: ___tracy_gpu_zone_begin_callstack_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin_alloc(arg1: ___tracy_gpu_zone_begin_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin_alloc_callstack(
arg1: ___tracy_gpu_zone_begin_callstack_data,
);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_end(data: ___tracy_gpu_zone_end_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_time(arg1: ___tracy_gpu_time_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_new_context(arg1: ___tracy_gpu_new_context_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_context_name(arg1: ___tracy_gpu_context_name_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_calibration(arg1: ___tracy_gpu_calibration_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_time_sync(arg1: ___tracy_gpu_time_sync_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin_serial(arg1: ___tracy_gpu_zone_begin_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin_callstack_serial(
arg1: ___tracy_gpu_zone_begin_callstack_data,
);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin_alloc_serial(arg1: ___tracy_gpu_zone_begin_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_begin_alloc_callstack_serial(
arg1: ___tracy_gpu_zone_begin_callstack_data,
);
}
extern "C" {
pub fn ___tracy_emit_gpu_zone_end_serial(data: ___tracy_gpu_zone_end_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_time_serial(arg1: ___tracy_gpu_time_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_new_context_serial(arg1: ___tracy_gpu_new_context_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_context_name_serial(arg1: ___tracy_gpu_context_name_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_calibration_serial(arg1: ___tracy_gpu_calibration_data);
}
extern "C" {
pub fn ___tracy_emit_gpu_time_sync_serial(arg1: ___tracy_gpu_time_sync_data);
}
extern "C" {
pub fn ___tracy_connected() -> i32;
}
extern "C" {
pub fn ___tracy_emit_memory_alloc(ptr: *const ::std::os::raw::c_void, size: usize, secure: i32);
}
extern "C" {
pub fn ___tracy_emit_memory_alloc_callstack(
ptr: *const ::std::os::raw::c_void,
size: usize,
depth: i32,
secure: i32,
);
}
extern "C" {
pub fn ___tracy_emit_memory_free(ptr: *const ::std::os::raw::c_void, secure: i32);
}
extern "C" {
pub fn ___tracy_emit_memory_free_callstack(
ptr: *const ::std::os::raw::c_void,
depth: i32,
secure: i32,
);
}
extern "C" {
pub fn ___tracy_emit_memory_alloc_named(
ptr: *const ::std::os::raw::c_void,
size: usize,
secure: i32,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn ___tracy_emit_memory_alloc_callstack_named(
ptr: *const ::std::os::raw::c_void,
size: usize,
depth: i32,
secure: i32,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn ___tracy_emit_memory_free_named(
ptr: *const ::std::os::raw::c_void,
secure: i32,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn ___tracy_emit_memory_free_callstack_named(
ptr: *const ::std::os::raw::c_void,
depth: i32,
secure: i32,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn ___tracy_emit_memory_discard(name: *const ::std::os::raw::c_char, secure: i32);
}
extern "C" {
pub fn ___tracy_emit_memory_discard_callstack(
name: *const ::std::os::raw::c_char,
secure: i32,
depth: i32,
);
}
extern "C" {
pub fn ___tracy_emit_message(
txt: *const ::std::os::raw::c_char,
size: usize,
callstack_depth: i32,
);
}
extern "C" {
pub fn ___tracy_emit_messageL(txt: *const ::std::os::raw::c_char, callstack_depth: i32);
}
extern "C" {
pub fn ___tracy_emit_messageC(
txt: *const ::std::os::raw::c_char,
size: usize,
color: u32,
callstack_depth: i32,
);
}
extern "C" {
pub fn ___tracy_emit_messageLC(
txt: *const ::std::os::raw::c_char,
color: u32,
callstack_depth: i32,
);
}
extern "C" {
pub fn ___tracy_emit_frame_mark(name: *const ::std::os::raw::c_char);
}
extern "C" {
pub fn ___tracy_emit_frame_mark_start(name: *const ::std::os::raw::c_char);
}
extern "C" {
pub fn ___tracy_emit_frame_mark_end(name: *const ::std::os::raw::c_char);
}
extern "C" {
pub fn ___tracy_emit_frame_image(
image: *const ::std::os::raw::c_void,
w: u16,
h: u16,
offset: u8,
flip: i32,
);
}
extern "C" {
pub fn ___tracy_emit_plot(name: *const ::std::os::raw::c_char, val: f64);
}
extern "C" {
pub fn ___tracy_emit_plot_float(name: *const ::std::os::raw::c_char, val: f32);
}
extern "C" {
pub fn ___tracy_emit_plot_int(name: *const ::std::os::raw::c_char, val: i64);
}
extern "C" {
pub fn ___tracy_emit_plot_config(
name: *const ::std::os::raw::c_char,
type_: i32,
step: i32,
fill: i32,
color: u32,
);
}
extern "C" {
pub fn ___tracy_emit_message_appinfo(txt: *const ::std::os::raw::c_char, size: usize);
}
extern "C" {
pub fn ___tracy_announce_lockable_ctx(
srcloc: *const ___tracy_source_location_data,
) -> *mut __tracy_lockable_context_data;
}
extern "C" {
pub fn ___tracy_terminate_lockable_ctx(lockdata: *mut __tracy_lockable_context_data);
}
extern "C" {
pub fn ___tracy_before_lock_lockable_ctx(lockdata: *mut __tracy_lockable_context_data) -> i32;
}
extern "C" {
pub fn ___tracy_after_lock_lockable_ctx(lockdata: *mut __tracy_lockable_context_data);
}
extern "C" {
pub fn ___t
gitextract_i5_mabxw/
├── .github/
│ └── workflows/
│ ├── sys-update.yml
│ └── test.yml
├── .gitignore
├── Cargo.toml
├── FEATURES.mkd
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.mkd
├── examples/
│ ├── Cargo.toml
│ ├── README.mkd
│ └── src/
│ ├── main.rs
│ ├── plots/
│ │ └── mod.rs
│ ├── secondary_frames/
│ │ └── mod.rs
│ ├── threads/
│ │ └── mod.rs
│ ├── wgpu_frame_images/
│ │ ├── blit.wgsl
│ │ ├── mod.rs
│ │ └── triangle.wgsl
│ └── zones/
│ └── mod.rs
├── make_sys.sh
├── tracing-tracy/
│ ├── Cargo.toml
│ └── src/
│ ├── config.rs
│ ├── lib.rs
│ └── tests.rs
├── tracy-client/
│ ├── Cargo.toml
│ ├── benches/
│ │ └── client.rs
│ ├── src/
│ │ ├── demangle.rs
│ │ ├── frame.rs
│ │ ├── gpu.rs
│ │ ├── lib.rs
│ │ ├── plot.rs
│ │ ├── span.rs
│ │ └── state.rs
│ └── tests/
│ ├── loom.rs
│ └── tests.rs
└── tracy-client-sys/
├── Cargo.toml
├── build.rs
├── src/
│ ├── dbghelp.rs
│ ├── generated.rs
│ ├── generated_fibers.rs
│ ├── generated_manual_lifetime.rs
│ └── lib.rs
├── tests.rs
└── tracy/
├── LICENSE
├── TracyClient.F90
├── TracyClient.cpp
├── client/
│ ├── TracyAlloc.cpp
│ ├── TracyArmCpuTable.hpp
│ ├── TracyCallstack.cpp
│ ├── TracyCallstack.h
│ ├── TracyCallstack.hpp
│ ├── TracyCpuid.hpp
│ ├── TracyDebug.hpp
│ ├── TracyDxt1.cpp
│ ├── TracyDxt1.hpp
│ ├── TracyFastVector.hpp
│ ├── TracyKCore.cpp
│ ├── TracyKCore.hpp
│ ├── TracyLock.hpp
│ ├── TracyOverride.cpp
│ ├── TracyProfiler.cpp
│ ├── TracyProfiler.hpp
│ ├── TracyRingBuffer.hpp
│ ├── TracyRocprof.cpp
│ ├── TracyScoped.hpp
│ ├── TracyStringHelpers.hpp
│ ├── TracySysPower.cpp
│ ├── TracySysPower.hpp
│ ├── TracySysTime.cpp
│ ├── TracySysTime.hpp
│ ├── TracySysTrace.cpp
│ ├── TracySysTrace.hpp
│ ├── TracyThread.hpp
│ ├── tracy_SPSCQueue.h
│ ├── tracy_concurrentqueue.h
│ ├── tracy_rpmalloc.cpp
│ └── tracy_rpmalloc.hpp
├── common/
│ ├── TracyAlign.hpp
│ ├── TracyAlloc.hpp
│ ├── TracyApi.h
│ ├── TracyColor.hpp
│ ├── TracyForceInline.hpp
│ ├── TracyMutex.hpp
│ ├── TracyProtocol.hpp
│ ├── TracyQueue.hpp
│ ├── TracySocket.cpp
│ ├── TracySocket.hpp
│ ├── TracyStackFrames.cpp
│ ├── TracyStackFrames.hpp
│ ├── TracySystem.cpp
│ ├── TracySystem.hpp
│ ├── TracyVersion.hpp
│ ├── TracyWinFamily.hpp
│ ├── TracyYield.hpp
│ ├── tracy_lz4.cpp
│ ├── tracy_lz4.hpp
│ ├── tracy_lz4hc.cpp
│ └── tracy_lz4hc.hpp
├── libbacktrace/
│ ├── LICENSE
│ ├── alloc.cpp
│ ├── backtrace.hpp
│ ├── config.h
│ ├── dwarf.cpp
│ ├── elf.cpp
│ ├── fileline.cpp
│ ├── filenames.hpp
│ ├── internal.hpp
│ ├── macho.cpp
│ ├── mmapio.cpp
│ ├── posix.cpp
│ ├── sort.cpp
│ └── state.cpp
└── tracy/
├── Tracy.hpp
├── TracyC.h
├── TracyCUDA.hpp
├── TracyD3D11.hpp
├── TracyD3D12.hpp
├── TracyLua.hpp
├── TracyMetal.hmm
├── TracyOpenCL.hpp
├── TracyOpenGL.hpp
└── TracyVulkan.hpp
SYMBOL INDEX (1824 symbols across 90 files)
FILE: examples/src/main.rs
type ExampleDesc (line 7) | struct ExampleDesc {
constant EXAMPLES (line 13) | const EXAMPLES: &[ExampleDesc] = &[
function main (line 41) | fn main() {
FILE: examples/src/plots/mod.rs
constant PLOT_PLAYER_COUNT (line 7) | const PLOT_PLAYER_COUNT: PlotName = tracy_client::plot_name!("Player Cou...
constant PLOT_DISK_SPACE (line 8) | const PLOT_DISK_SPACE: PlotName = tracy_client::plot_name!("Disk Space");
function main (line 10) | pub fn main() {
FILE: examples/src/secondary_frames/mod.rs
function main (line 7) | pub fn main() {
function simulate_physics (line 22) | fn simulate_physics(rng: &mut ThreadRng) {
function simulate_rendering (line 31) | fn simulate_rendering(rng: &mut ThreadRng) {
FILE: examples/src/threads/mod.rs
function main (line 7) | pub fn main() {
function simulate_physics (line 37) | fn simulate_physics(rng: &mut ThreadRng) {
function simulate_rendering (line 73) | fn simulate_rendering(rng: &mut ThreadRng) {
FILE: examples/src/wgpu_frame_images/mod.rs
function main (line 9) | pub fn main() {
type CaptureBufferStatus (line 34) | enum CaptureBufferStatus {
type CaptureBuffer (line 48) | struct CaptureBuffer {
constant WIDTH (line 58) | const WIDTH: u32 = 320;
constant HEIGHT (line 62) | const HEIGHT: u32 = 180;
constant AMOUNT (line 68) | const AMOUNT: usize = 3;
method new (line 70) | fn new(device: &wgpu::Device) -> Self {
method submit_to_tracy (line 106) | pub fn submit_to_tracy(&self, current_frame: u64, frame_num: u64) {
type Game (line 138) | struct Game {
method new (line 148) | fn new(device: &wgpu::Device, width: u32, height: u32) -> Game {
method render (line 258) | fn render(&mut self, device: &wgpu::Device, queue: &wgpu::Queue) {
type TriangleRenderer (line 359) | struct TriangleRenderer {
method new (line 367) | fn new(device: &wgpu::Device) -> Self {
method render (line 433) | fn render(
FILE: examples/src/zones/mod.rs
function main (line 7) | pub fn main() {
function simulate_physics (line 23) | fn simulate_physics(rng: &mut ThreadRng) {
function simulate_rendering (line 59) | fn simulate_rendering(rng: &mut ThreadRng) {
FILE: tracing-tracy/src/config.rs
type Config (line 42) | pub trait Config {
method formatter (line 46) | fn formatter(&self) -> &Self::Formatter;
method stack_depth (line 54) | fn stack_depth(&self, metadata: &tracing_core::Metadata<'_>) -> u16 {
method format_fields_in_zone_name (line 67) | fn format_fields_in_zone_name(&self) -> bool {
method on_error (line 87) | fn on_error(&self, client: &Client, error: &'static str) {
type Formatter (line 100) | type Formatter = DefaultFields;
method formatter (line 101) | fn formatter(&self) -> &Self::Formatter {
type DefaultConfig (line 97) | pub struct DefaultConfig(DefaultFields);
FILE: tracing-tracy/src/lib.rs
type TracyFields (line 69) | type TracyFields<C> = tracing_subscriber::fmt::FormattedFields<<C as Con...
type TracyLayer (line 87) | pub struct TracyLayer<C = DefaultConfig> {
function new (line 97) | pub fn new(config: C) -> Self {
function truncate_span_to_length (line 106) | fn truncate_span_to_length<'a>(
function truncate_to_length (line 121) | fn truncate_to_length<'a>(
method default (line 140) | fn default() -> Self {
function set_max_cache_size (line 157) | pub fn set_max_cache_size(max_bytes_used_per_thread: usize) {
function on_new_span (line 170) | fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, ...
function on_record (line 188) | fn on_record(&self, id: &Id, values: &Record<'_>, ctx: Context<'_, S>) {
function on_event (line 208) | fn on_event(&self, event: &Event, _: Context<'_, S>) {
function on_enter (line 234) | fn on_enter(&self, id: &Id, ctx: Context<S>) {
function on_exit (line 286) | fn on_exit(&self, id: &Id, _: Context<S>) {
function on_close (line 306) | fn on_close(&self, id: Id, ctx: Context<'_, S>) {
type TracyEventFieldVisitor (line 316) | struct TracyEventFieldVisitor<'a> {
method record_bool (line 323) | fn record_bool(&mut self, field: &Field, value: bool) {
method record_str (line 331) | fn record_str(&mut self, field: &Field, value: &str) {
method record_debug (line 347) | fn record_debug(&mut self, field: &Field, value: &dyn std::fmt::Debug) {
function main (line 362) | fn main() {
type VecCell (line 378) | pub struct VecCell<T>(UnsafeCell<Vec<T>>);
function new (line 381) | pub const fn new() -> Self {
function push (line 385) | pub fn push(&self, item: T) {
function pop (line 392) | pub fn pop(&self) -> Option<T> {
type StrCache (line 400) | pub struct StrCache {
method new (line 406) | pub const fn new() -> Self {
method acquire (line 413) | pub fn acquire(&self) -> StrCacheGuard {
method release (line 427) | fn release(&self, mut buf: String) {
type StrCacheGuard (line 456) | pub struct StrCacheGuard<'a> {
function new (line 462) | pub fn new(cache: &'a StrCache, buf: String) -> Self {
function into_inner (line 466) | pub fn into_inner(self) -> String {
type Target (line 473) | type Target = String;
method deref (line 475) | fn deref(&self) -> &Self::Target {
method deref_mut (line 481) | fn deref_mut(&mut self) -> &mut Self::Target {
method drop (line 487) | fn drop(&mut self) {
FILE: tracing-tracy/src/tests.rs
function it_works (line 10) | fn it_works() {
function it_works_2 (line 16) | fn it_works_2() {
function multiple_entries (line 26) | fn multiple_entries() {
function out_of_order (line 35) | fn out_of_order() {
function exit_in_different_thread (line 47) | fn exit_in_different_thread() {
function parent_task (line 56) | async fn parent_task(subtasks: usize) {
function subtask (line 73) | async fn subtask(number: usize) -> usize {
function async_futures (line 84) | async fn async_futures() {
function message_too_long (line 88) | fn message_too_long() {
function long_span_data (line 92) | fn long_span_data() {
function span_with_fields (line 97) | fn span_with_fields() {
function test (line 107) | pub(crate) fn test() {
type CallstackConfig (line 128) | struct CallstackConfig(DefaultConfig);
type Formatter (line 130) | type Formatter = <DefaultConfig as Config>::Formatter;
method formatter (line 131) | fn formatter(&self) -> &Self::Formatter {
method stack_depth (line 134) | fn stack_depth(&self, _: &tracing_core::Metadata<'_>) -> u16 {
function benchmark_span (line 139) | fn benchmark_span(c: &mut Criterion) {
function benchmark_message (line 162) | fn benchmark_message(c: &mut Criterion) {
function bench (line 183) | pub(crate) fn bench() {
FILE: tracy-client-sys/build.rs
function link_dependencies (line 9) | fn link_dependencies() {
function set_feature_defines (line 26) | fn set_feature_defines(mut c: cc::Build) -> cc::Build {
function build_tracy_client (line 89) | fn build_tracy_client() {
function read_env_and_rerun_if_changed (line 115) | fn read_env_and_rerun_if_changed(var: &str) -> Result<String, VarError> {
function main (line 120) | fn main() {
FILE: tracy-client-sys/src/dbghelp.rs
type BOOL (line 24) | type BOOL = i32;
type HANDLE (line 26) | type HANDLE = *mut core::ffi::c_void;
type PWSTR (line 28) | type PWSTR = *mut u16;
type PCSTR (line 30) | type PCSTR = *const u8;
type PCWSTR (line 32) | type PCWSTR = *const u16;
type WIN32_ERROR (line 33) | type WIN32_ERROR = u32;
type SECURITY_ATTRIBUTES (line 35) | struct SECURITY_ATTRIBUTES {
constant FALSE (line 41) | const FALSE: BOOL = 0i32;
constant TRUE (line 42) | const TRUE: BOOL = 1i32;
constant INFINITE (line 43) | const INFINITE: u32 = u32::MAX;
constant WAIT_FAILED (line 44) | const WAIT_FAILED: u32 = 0xFFFFFFFF;
function RustBacktraceMutexInit (line 66) | extern "C" fn RustBacktraceMutexInit() {
function init_dbghelp (line 88) | fn init_dbghelp() {
function loaded_modules_callback (line 123) | unsafe extern "system" fn loaded_modules_callback(
function RustBacktraceMutexLock (line 147) | extern "C" fn RustBacktraceMutexLock() {
function RustBacktraceMutexUnlock (line 162) | extern "C" fn RustBacktraceMutexUnlock() {
FILE: tracy-client-sys/src/generated.rs
constant TracyPlotFormatEnum_TracyPlotFormatNumber (line 1) | pub const TracyPlotFormatEnum_TracyPlotFormatNumber: TracyPlotFormatEnum...
constant TracyPlotFormatEnum_TracyPlotFormatMemory (line 2) | pub const TracyPlotFormatEnum_TracyPlotFormatMemory: TracyPlotFormatEnum...
constant TracyPlotFormatEnum_TracyPlotFormatPercentage (line 3) | pub const TracyPlotFormatEnum_TracyPlotFormatPercentage: TracyPlotFormat...
constant TracyPlotFormatEnum_TracyPlotFormatWatt (line 4) | pub const TracyPlotFormatEnum_TracyPlotFormatWatt: TracyPlotFormatEnum = 3;
type TracyPlotFormatEnum (line 5) | type TracyPlotFormatEnum = ::std::os::raw::c_uint;
function ___tracy_set_thread_name (line 7) | pub fn ___tracy_set_thread_name(name: *const ::std::os::raw::c_char);
type ___tracy_source_location_data (line 11) | pub struct ___tracy_source_location_data {
function bindgen_test_layout____tracy_source_location_data (line 19) | fn bindgen_test_layout____tracy_source_location_data() {
type ___tracy_c_zone_context (line 61) | pub struct ___tracy_c_zone_context {
function bindgen_test_layout____tracy_c_zone_context (line 66) | fn bindgen_test_layout____tracy_c_zone_context() {
type ___tracy_gpu_time_data (line 93) | pub struct ___tracy_gpu_time_data {
function bindgen_test_layout____tracy_gpu_time_data (line 99) | fn bindgen_test_layout____tracy_gpu_time_data() {
type ___tracy_gpu_zone_begin_data (line 131) | pub struct ___tracy_gpu_zone_begin_data {
function bindgen_test_layout____tracy_gpu_zone_begin_data (line 137) | fn bindgen_test_layout____tracy_gpu_zone_begin_data() {
type ___tracy_gpu_zone_begin_callstack_data (line 169) | pub struct ___tracy_gpu_zone_begin_callstack_data {
function bindgen_test_layout____tracy_gpu_zone_begin_callstack_data (line 176) | fn bindgen_test_layout____tracy_gpu_zone_begin_callstack_data() {
type ___tracy_gpu_zone_end_data (line 213) | pub struct ___tracy_gpu_zone_end_data {
function bindgen_test_layout____tracy_gpu_zone_end_data (line 218) | fn bindgen_test_layout____tracy_gpu_zone_end_data() {
type ___tracy_gpu_new_context_data (line 245) | pub struct ___tracy_gpu_new_context_data {
function bindgen_test_layout____tracy_gpu_new_context_data (line 253) | fn bindgen_test_layout____tracy_gpu_new_context_data() {
type ___tracy_gpu_context_name_data (line 295) | pub struct ___tracy_gpu_context_name_data {
function bindgen_test_layout____tracy_gpu_context_name_data (line 301) | fn bindgen_test_layout____tracy_gpu_context_name_data() {
type ___tracy_gpu_calibration_data (line 333) | pub struct ___tracy_gpu_calibration_data {
function bindgen_test_layout____tracy_gpu_calibration_data (line 339) | fn bindgen_test_layout____tracy_gpu_calibration_data() {
type ___tracy_gpu_time_sync_data (line 371) | pub struct ___tracy_gpu_time_sync_data {
function bindgen_test_layout____tracy_gpu_time_sync_data (line 376) | fn bindgen_test_layout____tracy_gpu_time_sync_data() {
type __tracy_lockable_context_data (line 403) | pub struct __tracy_lockable_context_data {
type TracyCZoneCtx (line 406) | type TracyCZoneCtx = ___tracy_c_zone_context;
function ___tracy_alloc_srcloc (line 408) | pub fn ___tracy_alloc_srcloc(
function ___tracy_alloc_srcloc_name (line 418) | pub fn ___tracy_alloc_srcloc_name(
function ___tracy_emit_zone_begin (line 430) | pub fn ___tracy_emit_zone_begin(
function ___tracy_emit_zone_begin_callstack (line 436) | pub fn ___tracy_emit_zone_begin_callstack(
function ___tracy_emit_zone_begin_alloc (line 443) | pub fn ___tracy_emit_zone_begin_alloc(srcloc: u64, active: i32) -> Tracy...
function ___tracy_emit_zone_begin_alloc_callstack (line 446) | pub fn ___tracy_emit_zone_begin_alloc_callstack(
function ___tracy_emit_zone_end (line 453) | pub fn ___tracy_emit_zone_end(ctx: TracyCZoneCtx);
function ___tracy_emit_zone_text (line 456) | pub fn ___tracy_emit_zone_text(
function ___tracy_emit_zone_name (line 463) | pub fn ___tracy_emit_zone_name(
function ___tracy_emit_zone_color (line 470) | pub fn ___tracy_emit_zone_color(ctx: TracyCZoneCtx, color: u32);
function ___tracy_emit_zone_value (line 473) | pub fn ___tracy_emit_zone_value(ctx: TracyCZoneCtx, value: u64);
function ___tracy_emit_gpu_zone_begin (line 476) | pub fn ___tracy_emit_gpu_zone_begin(arg1: ___tracy_gpu_zone_begin_data);
function ___tracy_emit_gpu_zone_begin_callstack (line 479) | pub fn ___tracy_emit_gpu_zone_begin_callstack(arg1: ___tracy_gpu_zone_be...
function ___tracy_emit_gpu_zone_begin_alloc (line 482) | pub fn ___tracy_emit_gpu_zone_begin_alloc(arg1: ___tracy_gpu_zone_begin_...
function ___tracy_emit_gpu_zone_begin_alloc_callstack (line 485) | pub fn ___tracy_emit_gpu_zone_begin_alloc_callstack(
function ___tracy_emit_gpu_zone_end (line 490) | pub fn ___tracy_emit_gpu_zone_end(data: ___tracy_gpu_zone_end_data);
function ___tracy_emit_gpu_time (line 493) | pub fn ___tracy_emit_gpu_time(arg1: ___tracy_gpu_time_data);
function ___tracy_emit_gpu_new_context (line 496) | pub fn ___tracy_emit_gpu_new_context(arg1: ___tracy_gpu_new_context_data);
function ___tracy_emit_gpu_context_name (line 499) | pub fn ___tracy_emit_gpu_context_name(arg1: ___tracy_gpu_context_name_da...
function ___tracy_emit_gpu_calibration (line 502) | pub fn ___tracy_emit_gpu_calibration(arg1: ___tracy_gpu_calibration_data);
function ___tracy_emit_gpu_time_sync (line 505) | pub fn ___tracy_emit_gpu_time_sync(arg1: ___tracy_gpu_time_sync_data);
function ___tracy_emit_gpu_zone_begin_serial (line 508) | pub fn ___tracy_emit_gpu_zone_begin_serial(arg1: ___tracy_gpu_zone_begin...
function ___tracy_emit_gpu_zone_begin_callstack_serial (line 511) | pub fn ___tracy_emit_gpu_zone_begin_callstack_serial(
function ___tracy_emit_gpu_zone_begin_alloc_serial (line 516) | pub fn ___tracy_emit_gpu_zone_begin_alloc_serial(arg1: ___tracy_gpu_zone...
function ___tracy_emit_gpu_zone_begin_alloc_callstack_serial (line 519) | pub fn ___tracy_emit_gpu_zone_begin_alloc_callstack_serial(
function ___tracy_emit_gpu_zone_end_serial (line 524) | pub fn ___tracy_emit_gpu_zone_end_serial(data: ___tracy_gpu_zone_end_data);
function ___tracy_emit_gpu_time_serial (line 527) | pub fn ___tracy_emit_gpu_time_serial(arg1: ___tracy_gpu_time_data);
function ___tracy_emit_gpu_new_context_serial (line 530) | pub fn ___tracy_emit_gpu_new_context_serial(arg1: ___tracy_gpu_new_conte...
function ___tracy_emit_gpu_context_name_serial (line 533) | pub fn ___tracy_emit_gpu_context_name_serial(arg1: ___tracy_gpu_context_...
function ___tracy_emit_gpu_calibration_serial (line 536) | pub fn ___tracy_emit_gpu_calibration_serial(arg1: ___tracy_gpu_calibrati...
function ___tracy_emit_gpu_time_sync_serial (line 539) | pub fn ___tracy_emit_gpu_time_sync_serial(arg1: ___tracy_gpu_time_sync_d...
function ___tracy_connected (line 542) | pub fn ___tracy_connected() -> i32;
function ___tracy_emit_memory_alloc (line 545) | pub fn ___tracy_emit_memory_alloc(ptr: *const ::std::os::raw::c_void, si...
function ___tracy_emit_memory_alloc_callstack (line 548) | pub fn ___tracy_emit_memory_alloc_callstack(
function ___tracy_emit_memory_free (line 556) | pub fn ___tracy_emit_memory_free(ptr: *const ::std::os::raw::c_void, sec...
function ___tracy_emit_memory_free_callstack (line 559) | pub fn ___tracy_emit_memory_free_callstack(
function ___tracy_emit_memory_alloc_named (line 566) | pub fn ___tracy_emit_memory_alloc_named(
function ___tracy_emit_memory_alloc_callstack_named (line 574) | pub fn ___tracy_emit_memory_alloc_callstack_named(
function ___tracy_emit_memory_free_named (line 583) | pub fn ___tracy_emit_memory_free_named(
function ___tracy_emit_memory_free_callstack_named (line 590) | pub fn ___tracy_emit_memory_free_callstack_named(
function ___tracy_emit_memory_discard (line 598) | pub fn ___tracy_emit_memory_discard(name: *const ::std::os::raw::c_char,...
function ___tracy_emit_memory_discard_callstack (line 601) | pub fn ___tracy_emit_memory_discard_callstack(
function ___tracy_emit_message (line 608) | pub fn ___tracy_emit_message(
function ___tracy_emit_messageL (line 615) | pub fn ___tracy_emit_messageL(txt: *const ::std::os::raw::c_char, callst...
function ___tracy_emit_messageC (line 618) | pub fn ___tracy_emit_messageC(
function ___tracy_emit_messageLC (line 626) | pub fn ___tracy_emit_messageLC(
function ___tracy_emit_frame_mark (line 633) | pub fn ___tracy_emit_frame_mark(name: *const ::std::os::raw::c_char);
function ___tracy_emit_frame_mark_start (line 636) | pub fn ___tracy_emit_frame_mark_start(name: *const ::std::os::raw::c_char);
function ___tracy_emit_frame_mark_end (line 639) | pub fn ___tracy_emit_frame_mark_end(name: *const ::std::os::raw::c_char);
function ___tracy_emit_frame_image (line 642) | pub fn ___tracy_emit_frame_image(
function ___tracy_emit_plot (line 651) | pub fn ___tracy_emit_plot(name: *const ::std::os::raw::c_char, val: f64);
function ___tracy_emit_plot_float (line 654) | pub fn ___tracy_emit_plot_float(name: *const ::std::os::raw::c_char, val...
function ___tracy_emit_plot_int (line 657) | pub fn ___tracy_emit_plot_int(name: *const ::std::os::raw::c_char, val: ...
function ___tracy_emit_plot_config (line 660) | pub fn ___tracy_emit_plot_config(
function ___tracy_emit_message_appinfo (line 669) | pub fn ___tracy_emit_message_appinfo(txt: *const ::std::os::raw::c_char,...
function ___tracy_announce_lockable_ctx (line 672) | pub fn ___tracy_announce_lockable_ctx(
function ___tracy_terminate_lockable_ctx (line 677) | pub fn ___tracy_terminate_lockable_ctx(lockdata: *mut __tracy_lockable_c...
function ___tracy_before_lock_lockable_ctx (line 680) | pub fn ___tracy_before_lock_lockable_ctx(lockdata: *mut __tracy_lockable...
function ___tracy_after_lock_lockable_ctx (line 683) | pub fn ___tracy_after_lock_lockable_ctx(lockdata: *mut __tracy_lockable_...
function ___tracy_after_unlock_lockable_ctx (line 686) | pub fn ___tracy_after_unlock_lockable_ctx(lockdata: *mut __tracy_lockabl...
function ___tracy_after_try_lock_lockable_ctx (line 689) | pub fn ___tracy_after_try_lock_lockable_ctx(
function ___tracy_mark_lockable_ctx (line 695) | pub fn ___tracy_mark_lockable_ctx(
function ___tracy_custom_name_lockable_ctx (line 701) | pub fn ___tracy_custom_name_lockable_ctx(
function ___tracy_begin_sampling_profiler (line 708) | pub fn ___tracy_begin_sampling_profiler() -> ::std::os::raw::c_int;
function ___tracy_end_sampling_profiler (line 711) | pub fn ___tracy_end_sampling_profiler();
FILE: tracy-client-sys/src/generated_fibers.rs
function ___tracy_fiber_enter (line 2) | pub fn ___tracy_fiber_enter(fiber: *const ::std::os::raw::c_char);
function ___tracy_fiber_leave (line 5) | pub fn ___tracy_fiber_leave();
FILE: tracy-client-sys/src/generated_manual_lifetime.rs
function ___tracy_startup_profiler (line 2) | pub fn ___tracy_startup_profiler();
function ___tracy_shutdown_profiler (line 5) | pub fn ___tracy_shutdown_profiler();
FILE: tracy-client-sys/tests.rs
function test_emit_zone (line 5) | fn test_emit_zone() {
function test_emit_message_no_null (line 19) | fn test_emit_message_no_null() {
function main (line 27) | pub(crate) fn main() {
function main (line 40) | fn main() {
FILE: tracy-client-sys/tracy/client/TracyAlloc.cpp
type tracy (line 10) | namespace tracy
function tracy_no_inline (line 17) | tracy_no_inline static void InitRpmallocPlumbing()
function TRACY_API (line 36) | TRACY_API void InitRpmalloc()
FILE: tracy-client-sys/tracy/client/TracyArmCpuTable.hpp
type tracy (line 1) | namespace tracy
FILE: tracy-client-sys/tracy/client/TracyCallstack.cpp
function ___tracy_init_demangle_buffer (line 91) | void ___tracy_init_demangle_buffer()
function ___tracy_free_demangle_buffer (line 96) | void ___tracy_free_demangle_buffer()
type tracy (line 117) | namespace tracy
function IsKernelAddress (line 120) | static bool IsKernelAddress(uint64_t addr) {
function DestroyImageEntry (line 124) | void DestroyImageEntry( ImageEntry& entry )
class ImageCache (line 130) | class ImageCache
method ImageCache (line 134) | ImageCache( size_t imageCacheCapacity = 512 )
method ImageEntry (line 144) | ImageEntry* AddEntry( const ImageEntry& entry )
method ImageEntry (line 152) | const ImageEntry* GetImageForAddress( uint64_t address )
method Sort (line 166) | void Sort()
method Clear (line 175) | void Clear()
method ContainsImage (line 186) | bool ContainsImage( uint64_t startAddress ) const
class ImageCacheDlIteratePhdr (line 199) | class ImageCacheDlIteratePhdr : public ImageCache
method ImageCacheDlIteratePhdr (line 203) | ImageCacheDlIteratePhdr()
method ImageEntry (line 212) | const ImageEntry* GetImageForAddress( uint64_t address )
method Callback (line 227) | static int Callback( struct dl_phdr_info* info, size_t size, void* d...
method Refresh (line 253) | void Refresh()
method UpdateMainImageName (line 266) | void UpdateMainImageName()
method Clear (line 295) | void Clear()
function CreateImageCaches (line 309) | void CreateImageCaches()
function DestroyImageCaches (line 316) | void DestroyImageCaches()
function ShouldResolveSymbolsOffline (line 341) | bool ShouldResolveSymbolsOffline()
function ___tracy_RtlWalkFrameChain (line 370) | TRACY_API unsigned long ___tracy_RtlWalkFrameChain( void** callers, un...
function InitCallstackCritical (line 376) | void InitCallstackCritical()
function DbgHelpInit (line 381) | void DbgHelpInit()
function DWORD64 (line 403) | DWORD64 DbgHelpLoadSymbolsForModule( const char* imageName, uint64_t b...
function ImageEntry (line 432) | ImageEntry* CacheModuleInfo( const char* imagePath, uint32_t imageName...
function ImageEntry (line 443) | ImageEntry* LoadSymbolsForModuleAndCache( const char* imagePath, uint3...
function CacheProcessDrivers (line 449) | static void CacheProcessDrivers()
function CacheProcessModules (line 502) | static void CacheProcessModules()
function InitCallstack (line 528) | void InitCallstack()
function EndCallstack (line 567) | void EndCallstack()
type ModuleNameAndBaseAddress (line 611) | struct ModuleNameAndBaseAddress
function ModuleNameAndBaseAddress (line 617) | ModuleNameAndBaseAddress GetModuleNameAndPrepareSymbols( uint64_t addr )
function CallstackSymbolData (line 659) | CallstackSymbolData DecodeSymbolAddress( uint64_t ptr )
function CallstackEntryData (line 696) | CallstackEntryData DecodeCallstackPtr( uint64_t ptr )
type backtrace_state (line 834) | struct backtrace_state
type DebugInfo (line 843) | struct DebugInfo
type KernelSymbol (line 855) | struct KernelSymbol
function InitKernelSymbols (line 866) | static void InitKernelSymbols()
function InitCallstackCritical (line 1025) | void InitCallstackCritical()
function InitCallstack (line 1029) | void InitCallstack()
function ClearDebugInfoVector (line 1065) | void ClearDebugInfoVector( FastVector<DebugInfo>& vec )
function DebugInfo (line 1076) | DebugInfo* FindDebugInfo( FastVector<DebugInfo>& vec, const uint8_t* b...
function GetDebugInfoDescriptor (line 1088) | int GetDebugInfoDescriptor( const char* buildid_data, size_t buildid_s...
function debuginfod_client (line 1121) | debuginfod_client* GetDebuginfodClient()
function EndCallstack (line 1127) | void EndCallstack()
function SymbolAddressDataCb (line 1165) | static int SymbolAddressDataCb( void* data, uintptr_t pc, uintptr_t lo...
function SymbolAddressErrorCb (line 1185) | static void SymbolAddressErrorCb( void* data, const char* /*msg*/, int...
function CallstackSymbolData (line 1193) | CallstackSymbolData DecodeSymbolAddress( uint64_t ptr )
function CallstackDataCb (line 1208) | static int CallstackDataCb( void* /*data*/, uintptr_t pc, uintptr_t lo...
function CallstackErrorCb (line 1280) | static void CallstackErrorCb( void* /*data*/, const char* /*msg*/, int...
function SymInfoCallback (line 1295) | void SymInfoCallback( void* /*data*/, uintptr_t pc, const char* symnam...
function SymInfoError (line 1301) | void SymInfoError( void* /*data*/, const char* /*msg*/, int /*errnum*/ )
function GetSymbolForOfflineResolve (line 1307) | void GetSymbolForOfflineResolve(void* address, uint64_t imageBaseAddre...
function CallstackEntryData (line 1318) | CallstackEntryData DecodeCallstackPtr( uint64_t ptr )
function InitCallstackCritical (line 1384) | void InitCallstackCritical()
function InitCallstack (line 1388) | void InitCallstack()
function EndCallstack (line 1393) | void EndCallstack()
function CallstackSymbolData (line 1419) | CallstackSymbolData DecodeSymbolAddress( uint64_t ptr )
function CallstackEntryData (line 1428) | CallstackEntryData DecodeCallstackPtr( uint64_t ptr )
FILE: tracy-client-sys/tracy/client/TracyCallstack.hpp
type tracy (line 10) | namespace tracy
type ImageEntry (line 13) | struct ImageEntry
function has_callstack (line 27) | static constexpr bool has_callstack() { return false; }
function tracy_force_inline (line 28) | static tracy_force_inline void* Callstack( int32_t /*depth*/ ) { retur...
function has_callstack (line 57) | static constexpr bool has_callstack() { return true; }
type CallstackSymbolData (line 59) | struct CallstackSymbolData
type CallstackEntry (line 67) | struct CallstackEntry
type CallstackEntryData (line 76) | struct CallstackEntryData
function tracy_force_inline (line 103) | static tracy_force_inline void* Callstack( int32_t depth )
type BacktraceState (line 114) | struct BacktraceState
function _Unwind_Reason_Code (line 120) | static _Unwind_Reason_Code tracy_unwind_callback( struct _Unwind_Conte...
function tracy_force_inline (line 132) | static tracy_force_inline void* Callstack( int32_t depth )
function tracy_force_inline (line 147) | static tracy_force_inline void* Callstack( int32_t depth )
type tracy (line 25) | namespace tracy
type ImageEntry (line 13) | struct ImageEntry
function has_callstack (line 27) | static constexpr bool has_callstack() { return false; }
function tracy_force_inline (line 28) | static tracy_force_inline void* Callstack( int32_t /*depth*/ ) { retur...
function has_callstack (line 57) | static constexpr bool has_callstack() { return true; }
type CallstackSymbolData (line 59) | struct CallstackSymbolData
type CallstackEntry (line 67) | struct CallstackEntry
type CallstackEntryData (line 76) | struct CallstackEntryData
function tracy_force_inline (line 103) | static tracy_force_inline void* Callstack( int32_t depth )
type BacktraceState (line 114) | struct BacktraceState
function _Unwind_Reason_Code (line 120) | static _Unwind_Reason_Code tracy_unwind_callback( struct _Unwind_Conte...
function tracy_force_inline (line 132) | static tracy_force_inline void* Callstack( int32_t depth )
function tracy_force_inline (line 147) | static tracy_force_inline void* Callstack( int32_t depth )
type tracy (line 54) | namespace tracy
type ImageEntry (line 13) | struct ImageEntry
function has_callstack (line 27) | static constexpr bool has_callstack() { return false; }
function tracy_force_inline (line 28) | static tracy_force_inline void* Callstack( int32_t /*depth*/ ) { retur...
function has_callstack (line 57) | static constexpr bool has_callstack() { return true; }
type CallstackSymbolData (line 59) | struct CallstackSymbolData
type CallstackEntry (line 67) | struct CallstackEntry
type CallstackEntryData (line 76) | struct CallstackEntryData
function tracy_force_inline (line 103) | static tracy_force_inline void* Callstack( int32_t depth )
type BacktraceState (line 114) | struct BacktraceState
function _Unwind_Reason_Code (line 120) | static _Unwind_Reason_Code tracy_unwind_callback( struct _Unwind_Conte...
function tracy_force_inline (line 132) | static tracy_force_inline void* Callstack( int32_t depth )
function tracy_force_inline (line 147) | static tracy_force_inline void* Callstack( int32_t depth )
FILE: tracy-client-sys/tracy/client/TracyDxt1.cpp
type tracy (line 27) | namespace tracy
function to565 (line 30) | static inline uint16_t to565( uint8_t r, uint8_t g, uint8_t b )
function to565 (line 35) | static inline uint16_t to565( uint32_t c )
function tracy_force_inline (line 148) | static tracy_force_inline uint64_t ProcessRGB( const uint8_t* src )
function tracy_force_inline (line 467) | static tracy_force_inline void ProcessRGB_AVX( const uint8_t* src, cha...
function CompressImageDxt1 (line 585) | void CompressImageDxt1( const char* src, char* dst, int w, int h )
FILE: tracy-client-sys/tracy/client/TracyDxt1.hpp
type tracy (line 4) | namespace tracy
FILE: tracy-client-sys/tracy/client/TracyFastVector.hpp
type tracy (line 10) | namespace tracy
class FastVector (line 14) | class FastVector
method FastVector (line 20) | FastVector( size_t capacity )
method FastVector (line 28) | FastVector( const FastVector& ) = delete;
method FastVector (line 29) | FastVector( FastVector&& ) = delete;
method FastVector (line 36) | FastVector& operator=( const FastVector& ) = delete;
method FastVector (line 37) | FastVector& operator=( FastVector&& ) = delete;
method empty (line 39) | bool empty() const { return m_ptr == m_write; }
method size (line 40) | size_t size() const { return m_write - m_ptr; }
method T (line 42) | T* data() { return m_ptr; }
method T (line 43) | const T* data() const { return m_ptr; }
method T (line 45) | T* begin() { return m_ptr; }
method T (line 46) | const T* begin() const { return m_ptr; }
method T (line 47) | T* end() { return m_write; }
method T (line 48) | const T* end() const { return m_write; }
method T (line 50) | T& front() { assert( !empty() ); return m_ptr[0]; }
method T (line 51) | const T& front() const { assert( !empty() ); return m_ptr[0]; }
method T (line 53) | T& back() { assert( !empty() ); return m_write[-1]; }
method T (line 54) | const T& back() const { assert( !empty() ); return m_write[-1]; }
method T (line 56) | T& operator[]( size_t idx ) { return m_ptr[idx]; }
method T (line 57) | const T& operator[]( size_t idx ) const { return m_ptr[idx]; }
method T (line 59) | T* push_next()
method T (line 65) | T* prepare_next()
method commit_next (line 71) | void commit_next()
method clear (line 76) | void clear()
method swap (line 81) | void swap( FastVector& vec )
method tracy_no_inline (line 99) | tracy_no_inline void AllocMore()
FILE: tracy-client-sys/tracy/client/TracyKCore.cpp
type tracy (line 18) | namespace tracy
type elf_ehdr (line 35) | struct elf_ehdr
type elf_phdr (line 53) | struct elf_phdr
FILE: tracy-client-sys/tracy/client/TracyKCore.hpp
type tracy (line 10) | namespace tracy
class KCore (line 13) | class KCore
type Offset (line 15) | struct Offset
FILE: tracy-client-sys/tracy/client/TracyLock.hpp
type tracy (line 11) | namespace tracy
class LockableCtx (line 14) | class LockableCtx
function tracy_force_inline (line 41) | tracy_force_inline ~LockableCtx()
function tracy_force_inline (line 53) | tracy_force_inline bool BeforeLock()
function tracy_force_inline (line 77) | tracy_force_inline void AfterLock()
function tracy_force_inline (line 87) | tracy_force_inline void AfterUnlock()
function tracy_force_inline (line 106) | tracy_force_inline void AfterTryLock( bool acquired )
function tracy_force_inline (line 134) | tracy_force_inline void Mark( const SourceLocationData* srcloc )
function tracy_force_inline (line 155) | tracy_force_inline void CustomName( const char* name, size_t size )
class Lockable (line 181) | class Lockable
method tracy_force_inline (line 184) | tracy_force_inline Lockable( const SourceLocationData* srcloc )
method Lockable (line 189) | Lockable( const Lockable& ) = delete;
method Lockable (line 190) | Lockable& operator=( const Lockable& ) = delete;
method tracy_force_inline (line 192) | tracy_force_inline void lock()
method tracy_force_inline (line 199) | tracy_force_inline void unlock()
method tracy_force_inline (line 205) | tracy_force_inline bool try_lock()
method tracy_force_inline (line 212) | tracy_force_inline void Mark( const SourceLocationData* srcloc )
method tracy_force_inline (line 217) | tracy_force_inline void CustomName( const char* name, size_t size )
class SharedLockableCtx (line 229) | class SharedLockableCtx
function tracy_force_inline (line 256) | tracy_force_inline ~SharedLockableCtx()
function tracy_force_inline (line 268) | tracy_force_inline bool BeforeLock()
function tracy_force_inline (line 292) | tracy_force_inline void AfterLock()
function tracy_force_inline (line 302) | tracy_force_inline void AfterUnlock()
function tracy_force_inline (line 321) | tracy_force_inline void AfterTryLock( bool acquired )
function tracy_force_inline (line 349) | tracy_force_inline bool BeforeLockShared()
function tracy_force_inline (line 373) | tracy_force_inline void AfterLockShared()
function tracy_force_inline (line 383) | tracy_force_inline void AfterUnlockShared()
function tracy_force_inline (line 403) | tracy_force_inline void AfterTryLockShared( bool acquired )
function tracy_force_inline (line 431) | tracy_force_inline void Mark( const SourceLocationData* srcloc )
function tracy_force_inline (line 452) | tracy_force_inline void CustomName( const char* name, size_t size )
class SharedLockable (line 478) | class SharedLockable
method tracy_force_inline (line 481) | tracy_force_inline SharedLockable( const SourceLocationData* srcloc )
method SharedLockable (line 486) | SharedLockable( const SharedLockable& ) = delete;
method SharedLockable (line 487) | SharedLockable& operator=( const SharedLockable& ) = delete;
method tracy_force_inline (line 489) | tracy_force_inline void lock()
method tracy_force_inline (line 496) | tracy_force_inline void unlock()
method tracy_force_inline (line 502) | tracy_force_inline bool try_lock()
method tracy_force_inline (line 509) | tracy_force_inline void lock_shared()
method tracy_force_inline (line 516) | tracy_force_inline void unlock_shared()
method tracy_force_inline (line 522) | tracy_force_inline bool try_lock_shared()
method tracy_force_inline (line 529) | tracy_force_inline void Mark( const SourceLocationData* srcloc )
method tracy_force_inline (line 534) | tracy_force_inline void CustomName( const char* name, size_t size )
FILE: tracy-client-sys/tracy/client/TracyOverride.cpp
function dlclose (line 9) | int dlclose( void* hnd )
FILE: tracy-client-sys/tracy/client/TracyProfiler.cpp
type tracy (line 140) | namespace tracy
type MappingInfo (line 156) | struct MappingInfo {
function ParseMappings (line 172) | static std::vector<MappingInfo> ParseMappings()
function MappingInfo (line 210) | static MappingInfo* LookUpMapping(std::vector<MappingInfo>& mappings, ...
function MappingInfo (line 235) | static MappingInfo* LookUpMapping(uintptr_t address)
function EnsureReadable (line 253) | static bool EnsureReadable( MappingInfo& mapping )
function EnsureReadable (line 279) | static bool EnsureReadable( uintptr_t address )
function EnsureReadable (line 285) | static bool EnsureReadable( uintptr_t address )
function EnsureReadable (line 292) | static bool EnsureReadable( uintptr_t address )
type InitTimeWrapper (line 300) | struct InitTimeWrapper
type ProducerWrapper (line 305) | struct ProducerWrapper
method ProducerWrapper (line 1252) | ProducerWrapper( ProfilerData& data ) : detail( data.queue ), ptr( d...
type ThreadHandleWrapper (line 310) | struct ThreadHandleWrapper
function CpuId (line 318) | static inline void CpuId( uint32_t* regs, uint32_t leaf )
function InitFailure (line 328) | static void InitFailure( const char* msg )
function CheckHardwareSupportsInvariantTSC (line 374) | static bool CheckHardwareSupportsInvariantTSC()
function HardwareSupportsInvariantTSC (line 396) | bool HardwareSupportsInvariantTSC()
function SetupHwTimer (line 403) | static int64_t SetupHwTimer()
function SetupHwTimer (line 419) | static int64_t SetupHwTimer()
function GetHex (line 495) | static uint32_t GetHex( char*& ptr, int skip )
type utsname (line 553) | struct utsname
type sysinfo (line 735) | struct sysinfo
type asinfo_entry (line 749) | struct asinfo_entry
type asinfo_entry (line 750) | struct asinfo_entry
type asinfo_entry (line 756) | struct asinfo_entry
function GetPid (line 770) | static uint64_t GetPid()
function BroadcastMessage (line 795) | static BroadcastMessage& GetBroadcastMessage( const char* procname, si...
function LONG (line 816) | LONG WINAPI CrashFilter( PEXCEPTION_POINTERS pExp )
function LONG (line 920) | LONG WINAPI CrashFilterExecute( PEXCEPTION_POINTERS pExp )
function ThreadFreezer (line 949) | static void ThreadFreezer( int /*signal*/ )
function HexPrint (line 954) | static inline void HexPrint( char*& ptr, uint64_t val )
function CrashHandler (line 980) | static void CrashHandler( int signal, siginfo_t* info, void* /*ucontex...
function StartSystemTracing (line 1173) | static void StartSystemTracing( int64_t& samplingPeriod )
function StopSystemTracing (line 1195) | static void StopSystemTracing()
function TRACY_API (line 1225) | TRACY_API int64_t GetFrequencyQpc()
type ThreadNameData (line 1237) | struct ThreadNameData
type ProfilerData (line 1240) | struct ProfilerData
type ProducerWrapper (line 1250) | struct ProducerWrapper
method ProducerWrapper (line 1252) | ProducerWrapper( ProfilerData& data ) : detail( data.queue ), ptr( d...
type ProfilerThreadData (line 1257) | struct ProfilerThreadData
method ProfilerThreadData (line 1259) | ProfilerThreadData( ProfilerData& data ) : token( data ), gpuCtx( { ...
function TRACY_API (line 1276) | TRACY_API void StartupProfiler()
function ProfilerData (line 1284) | static ProfilerData& GetProfilerData()
function TRACY_API (line 1289) | TRACY_API void ShutdownProfiler()
function TRACY_API (line 1299) | TRACY_API bool IsProfilerStarted()
function ProfilerData (line 1307) | static ProfilerData& GetProfilerData()
type ProfilerThreadDataKey (line 1333) | struct ProfilerThreadDataKey
method ProfilerThreadDataKey (line 1336) | ProfilerThreadDataKey()
method ProfilerThreadData (line 1348) | ProfilerThreadData& get()
method sDestructor (line 1362) | static void sDestructor(void* p)
function ProfilerThreadData (line 1369) | static ProfilerThreadData& GetProfilerThreadData()
method ProfilerThreadData (line 1259) | ProfilerThreadData( ProfilerData& data ) : token( data ), gpuCtx( { ...
function ProfilerThreadData (line 1375) | static ProfilerThreadData& GetProfilerThreadData()
method ProfilerThreadData (line 1259) | ProfilerThreadData( ProfilerData& data ) : token( data ), gpuCtx( { ...
function TRACY_API (line 1382) | TRACY_API moodycamel::ConcurrentQueue<QueueItem>::ExplicitProducer* Ge...
function TRACY_API (line 1383) | TRACY_API Profiler& GetProfiler() { return GetProfilerData().profiler; }
function TRACY_API (line 1384) | TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue() { return ...
function TRACY_API (line 1385) | TRACY_API int64_t GetInitTime() { return GetProfilerData().initTime; }
function TRACY_API (line 1386) | TRACY_API std::atomic<uint32_t>& GetLockCounter() { return GetProfiler...
function TRACY_API (line 1387) | TRACY_API std::atomic<uint8_t>& GetGpuCtxCounter() { return GetProfile...
function TRACY_API (line 1388) | TRACY_API GpuCtxWrapper& GetGpuCtx() { return GetProfilerThreadData()....
function TRACY_API (line 1389) | TRACY_API uint32_t GetThreadHandle() { return detail::GetThreadHandleI...
function TRACY_API (line 1393) | TRACY_API LuaZoneState& GetLuaZoneState() { return GetProfilerThreadDa...
type ThreadNameData (line 1432) | struct ThreadNameData
function TRACY_API (line 1442) | TRACY_API moodycamel::ConcurrentQueue<QueueItem>::ExplicitProducer* Ge...
function TRACY_API (line 1443) | TRACY_API Profiler& GetProfiler() { return s_profiler; }
function TRACY_API (line 1444) | TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue() { return ...
function TRACY_API (line 1445) | TRACY_API int64_t GetInitTime() { return s_initTime.val; }
function TRACY_API (line 1446) | TRACY_API std::atomic<uint32_t>& GetLockCounter() { return s_lockCount...
function TRACY_API (line 1447) | TRACY_API std::atomic<uint8_t>& GetGpuCtxCounter() { return s_gpuCtxCo...
function TRACY_API (line 1448) | TRACY_API GpuCtxWrapper& GetGpuCtx() { return s_gpuCtx; }
function TRACY_API (line 1449) | TRACY_API uint32_t GetThreadHandle() { return s_threadHandle.val; }
function TRACY_API (line 1454) | TRACY_API LuaZoneState& GetLuaZoneState() { return s_luaZoneState; }
function TRACY_API (line 1458) | TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; }
function TRACY_API (line 1459) | TRACY_API bool ProfilerAllocatorAvailable() { return !RpThreadShutdown; }
function TRACY_API (line 1461) | TRACY_API bool BeginSamplingProfiling() { return GetProfiler().BeginSa...
function TRACY_API (line 1462) | TRACY_API void EndSamplingProfiling() { return GetProfiler().EndSampli...
type sigaction (line 1564) | struct sigaction
type sigaction (line 1568) | struct sigaction
type sigaction (line 1604) | struct sigaction
type sigaction (line 1605) | struct sigaction
type stat (line 1750) | struct stat
function FreeAssociatedMemory (line 2317) | static void FreeAssociatedMemory( const QueueItem& item )
type CpuData (line 3893) | struct CpuData
type stat (line 4190) | struct stat
type stat (line 4223) | struct stat
function TRACY_API (line 4302) | TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin( const struct ___tracy_...
function TRACY_API (line 4330) | TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct...
function TRACY_API (line 4363) | TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_alloc( uint64_t srcloc,...
function TRACY_API (line 4395) | TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_alloc_callstack( uint64...
function TRACY_API (line 4432) | TRACY_API void ___tracy_emit_zone_end( TracyCZoneCtx ctx )
function TRACY_API (line 4449) | TRACY_API void ___tracy_emit_zone_text( TracyCZoneCtx ctx, const char* t...
function TRACY_API (line 4470) | TRACY_API void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* t...
function TRACY_API (line 4491) | TRACY_API void ___tracy_emit_zone_color( TracyCZoneCtx ctx, uint32_t col...
function TRACY_API (line 4509) | TRACY_API void ___tracy_emit_zone_value( TracyCZoneCtx ctx, uint64_t val...
function TRACY_API (line 4526) | TRACY_API void ___tracy_emit_memory_alloc( const void* ptr, size_t size,...
function TRACY_API (line 4527) | TRACY_API void ___tracy_emit_memory_alloc_callstack( const void* ptr, si...
function TRACY_API (line 4538) | TRACY_API void ___tracy_emit_memory_free( const void* ptr, int32_t secur...
function TRACY_API (line 4539) | TRACY_API void ___tracy_emit_memory_free_callstack( const void* ptr, int...
function TRACY_API (line 4550) | TRACY_API void ___tracy_emit_memory_discard( const char* name, int32_t s...
function TRACY_API (line 4551) | TRACY_API void ___tracy_emit_memory_discard_callstack( const char* name,...
function TRACY_API (line 4562) | TRACY_API void ___tracy_emit_memory_alloc_named( const void* ptr, size_t...
function TRACY_API (line 4563) | TRACY_API void ___tracy_emit_memory_alloc_callstack_named( const void* p...
function TRACY_API (line 4574) | TRACY_API void ___tracy_emit_memory_free_named( const void* ptr, int32_t...
function TRACY_API (line 4575) | TRACY_API void ___tracy_emit_memory_free_callstack_named( const void* pt...
function TRACY_API (line 4586) | TRACY_API void ___tracy_emit_frame_mark( const char* name ) { tracy::Pro...
function TRACY_API (line 4587) | TRACY_API void ___tracy_emit_frame_mark_start( const char* name ) { trac...
function TRACY_API (line 4588) | TRACY_API void ___tracy_emit_frame_mark_end( const char* name ) { tracy:...
function TRACY_API (line 4589) | TRACY_API void ___tracy_emit_frame_image( const void* image, uint16_t w,...
function TRACY_API (line 4590) | TRACY_API void ___tracy_emit_plot( const char* name, double val ) { trac...
function TRACY_API (line 4591) | TRACY_API void ___tracy_emit_plot_float( const char* name, float val ) {...
function TRACY_API (line 4592) | TRACY_API void ___tracy_emit_plot_int( const char* name, int64_t val ) {...
function TRACY_API (line 4593) | TRACY_API void ___tracy_emit_plot_config( const char* name, int32_t type...
function TRACY_API (line 4594) | TRACY_API void ___tracy_emit_message( const char* txt, size_t size, int3...
function TRACY_API (line 4595) | TRACY_API void ___tracy_emit_messageL( const char* txt, int32_t callstac...
function TRACY_API (line 4596) | TRACY_API void ___tracy_emit_messageC( const char* txt, size_t size, uin...
function TRACY_API (line 4597) | TRACY_API void ___tracy_emit_messageLC( const char* txt, uint32_t color,...
function TRACY_API (line 4598) | TRACY_API void ___tracy_emit_message_appinfo( const char* txt, size_t si...
function TRACY_API (line 4600) | TRACY_API uint64_t ___tracy_alloc_srcloc( uint32_t line, const char* sou...
function TRACY_API (line 4604) | TRACY_API uint64_t ___tracy_alloc_srcloc_name( uint32_t line, const char...
function TRACY_API (line 4608) | TRACY_API void ___tracy_emit_gpu_zone_begin( const struct ___tracy_gpu_z...
function TRACY_API (line 4619) | TRACY_API void ___tracy_emit_gpu_zone_begin_callstack( const struct ___t...
function TRACY_API (line 4631) | TRACY_API void ___tracy_emit_gpu_zone_begin_alloc( const struct ___tracy...
function TRACY_API (line 4642) | TRACY_API void ___tracy_emit_gpu_zone_begin_alloc_callstack( const struc...
function TRACY_API (line 4654) | TRACY_API void ___tracy_emit_gpu_time( const struct ___tracy_gpu_time_da...
function TRACY_API (line 4663) | TRACY_API void ___tracy_emit_gpu_zone_end( const struct ___tracy_gpu_zon...
function TRACY_API (line 4673) | TRACY_API void ___tracy_emit_gpu_new_context( ___tracy_gpu_new_context_d...
function TRACY_API (line 4691) | TRACY_API void ___tracy_emit_gpu_context_name( const struct ___tracy_gpu...
function TRACY_API (line 4708) | TRACY_API void ___tracy_emit_gpu_calibration( const struct ___tracy_gpu_...
function TRACY_API (line 4718) | TRACY_API void ___tracy_emit_gpu_time_sync( const struct ___tracy_gpu_ti...
function TRACY_API (line 4727) | TRACY_API void ___tracy_emit_gpu_zone_begin_serial( const struct ___trac...
function TRACY_API (line 4739) | TRACY_API void ___tracy_emit_gpu_zone_begin_callstack_serial( const stru...
function TRACY_API (line 4751) | TRACY_API void ___tracy_emit_gpu_zone_begin_alloc_serial( const struct _...
function TRACY_API (line 4763) | TRACY_API void ___tracy_emit_gpu_zone_begin_alloc_callstack_serial( cons...
function TRACY_API (line 4775) | TRACY_API void ___tracy_emit_gpu_time_serial( const struct ___tracy_gpu_...
function TRACY_API (line 4785) | TRACY_API void ___tracy_emit_gpu_zone_end_serial( const struct ___tracy_...
function TRACY_API (line 4796) | TRACY_API void ___tracy_emit_gpu_new_context_serial( ___tracy_gpu_new_co...
function TRACY_API (line 4815) | TRACY_API void ___tracy_emit_gpu_context_name_serial( const struct ___tr...
function TRACY_API (line 4833) | TRACY_API void ___tracy_emit_gpu_calibration_serial( const struct ___tra...
function TRACY_API (line 4844) | TRACY_API void ___tracy_emit_gpu_time_sync_serial( const struct ___tracy...
type __tracy_lockable_context_data (line 4854) | struct __tracy_lockable_context_data
function TRACY_API (line 4863) | TRACY_API struct __tracy_lockable_context_data* ___tracy_announce_lockab...
function TRACY_API (line 4887) | TRACY_API void ___tracy_terminate_lockable_ctx( struct __tracy_lockable_...
function TRACY_API (line 4905) | TRACY_API int32_t ___tracy_before_lock_lockable_ctx( struct __tracy_lock...
function TRACY_API (line 4929) | TRACY_API void ___tracy_after_lock_lockable_ctx( struct __tracy_lockable...
function TRACY_API (line 4939) | TRACY_API void ___tracy_after_unlock_lockable_ctx( struct __tracy_lockab...
function TRACY_API (line 4958) | TRACY_API void ___tracy_after_try_lock_lockable_ctx( struct __tracy_lock...
function TRACY_API (line 4986) | TRACY_API void ___tracy_mark_lockable_ctx( struct __tracy_lockable_conte...
function TRACY_API (line 5007) | TRACY_API void ___tracy_custom_name_lockable_ctx( struct __tracy_lockabl...
function TRACY_API (line 5023) | TRACY_API int32_t ___tracy_connected( void )
function TRACY_API (line 5029) | TRACY_API void ___tracy_fiber_enter( const char* fiber ){ tracy::Profile...
function TRACY_API (line 5030) | TRACY_API void ___tracy_fiber_leave( void ){ tracy::Profiler::LeaveFiber...
function TRACY_API (line 5034) | TRACY_API void ___tracy_startup_profiler( void )
function TRACY_API (line 5039) | TRACY_API void ___tracy_shutdown_profiler( void )
function TRACY_API (line 5044) | TRACY_API int32_t ___tracy_profiler_started( void )
function TRACY_API (line 5050) | TRACY_API int ___tracy_begin_sampling_profiling( void ) {
function TRACY_API (line 5054) | TRACY_API void ___tracy_end_sampling_profiling( void ) {
FILE: tracy-client-sys/tracy/client/TracyProfiler.hpp
type tracy (line 50) | namespace tracy
class GpuCtx (line 64) | class GpuCtx
class Profiler (line 65) | class Profiler
type FrameImageQueueItem (line 166) | struct FrameImageQueueItem
type SymbolQueueItemType (line 175) | enum class SymbolQueueItemType
type SymbolQueueItem (line 184) | struct SymbolQueueItem
method tracy_force_inline (line 198) | static tracy_force_inline int64_t GetTime()
method tracy_force_inline (line 261) | tracy_force_inline uint32_t GetNextZoneId()
method tracy_force_inline (line 266) | static tracy_force_inline QueueItem* QueueSerial()
method tracy_force_inline (line 273) | static tracy_force_inline QueueItem* QueueSerialCallstack( void* ptr )
method tracy_force_inline (line 281) | static tracy_force_inline void QueueSerialFinish()
method tracy_force_inline (line 288) | static tracy_force_inline void SendFrameMark( const char* name )
method tracy_force_inline (line 301) | static tracy_force_inline void SendFrameMark( const char* name, Queu...
method tracy_force_inline (line 314) | static tracy_force_inline void SendFrameImage( const void* image, ui...
method tracy_force_inline (line 344) | static tracy_force_inline void PlotData( const char* name, int64_t v...
method tracy_force_inline (line 356) | static tracy_force_inline void PlotData( const char* name, float val )
method tracy_force_inline (line 368) | static tracy_force_inline void PlotData( const char* name, double val )
method tracy_force_inline (line 380) | static tracy_force_inline void ConfigurePlot( const char* name, Plot...
method tracy_force_inline (line 396) | static tracy_force_inline void Message( const char* txt, size_t size...
method tracy_force_inline (line 417) | static tracy_force_inline void Message( const char* txt, int32_t cal...
method tracy_force_inline (line 433) | static tracy_force_inline void MessageColor( const char* txt, size_t...
method tracy_force_inline (line 457) | static tracy_force_inline void MessageColor( const char* txt, uint32...
method tracy_force_inline (line 476) | static tracy_force_inline void MessageAppInfo( const char* txt, size...
method tracy_force_inline (line 493) | static tracy_force_inline void MemAlloc( const void* ptr, size_t siz...
method tracy_force_inline (line 506) | static tracy_force_inline void MemFree( const void* ptr, bool secure )
method tracy_force_inline (line 519) | static tracy_force_inline void MemAllocCallstack( const void* ptr, s...
method tracy_force_inline (line 543) | static tracy_force_inline void MemFreeCallstack( const void* ptr, in...
method tracy_force_inline (line 572) | static tracy_force_inline void MemAllocNamed( const void* ptr, size_...
method tracy_force_inline (line 586) | static tracy_force_inline void MemFreeNamed( const void* ptr, bool s...
method tracy_force_inline (line 600) | static tracy_force_inline void MemAllocCallstackNamed( const void* p...
method tracy_force_inline (line 625) | static tracy_force_inline void MemFreeCallstackNamed( const void* pt...
method tracy_force_inline (line 650) | static tracy_force_inline void MemDiscard( const char* name, bool se...
method tracy_force_inline (line 663) | static tracy_force_inline void MemDiscardCallstack( const char* name...
method tracy_force_inline (line 686) | static tracy_force_inline void SendCallstack( int32_t depth )
method tracy_force_inline (line 697) | static tracy_force_inline void ParameterRegister( ParameterCallback ...
method tracy_force_inline (line 704) | static tracy_force_inline void ParameterSetup( uint32_t idx, const c...
method tracy_force_inline (line 719) | static tracy_force_inline void SourceCallbackRegister( SourceContent...
method tracy_force_inline (line 727) | static tracy_force_inline void EnterFiber( const char* fiber, int32_...
method tracy_force_inline (line 739) | static tracy_force_inline void LeaveFiber()
method tracy_force_inline (line 755) | tracy_force_inline bool IsConnected() const
method tracy_force_inline (line 760) | tracy_force_inline void SetProgramName( const char* name )
method tracy_force_inline (line 768) | tracy_force_inline uint64_t ConnectionId() const
method tracy_force_inline (line 773) | tracy_force_inline void DeferItem( const QueueItem& item )
method RequestShutdown (line 782) | void RequestShutdown() { m_shutdown.store( true, std::memory_order_r...
method HasShutdownFinished (line 783) | bool HasShutdownFinished() const { return m_shutdownFinished.load( s...
method SendString (line 785) | void SendString( uint64_t str, const char* ptr, QueueType type ) { S...
method SendSingleString (line 787) | void SendSingleString( const char* ptr ) { SendSingleString( ptr, st...
method SendSecondString (line 789) | void SendSecondString( const char* ptr ) { SendSecondString( ptr, st...
method tracy_force_inline (line 803) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
method tracy_force_inline (line 808) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
method tracy_force_inline (line 813) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
method tracy_force_inline (line 818) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
type DequeueStatus (line 839) | enum class DequeueStatus { DataDequeued, ConnectionLost, QueueEmpty }
type ThreadCtxStatus (line 840) | enum class ThreadCtxStatus { Same, Changed, ConnectionLost }
method LaunchWorker (line 842) | static void LaunchWorker( void* ptr ) { ((Profiler*)ptr)->Worker(); }
method LaunchCompressWorker (line 846) | static void LaunchCompressWorker( void* ptr ) { ((Profiler*)ptr)->Co...
method LaunchSymbolWorker (line 851) | static void LaunchSymbolWorker( void* ptr ) { ((Profiler*)ptr)->Symb...
method tracy_force_inline (line 867) | tracy_force_inline bool AppendData( const void* data, size_t len )
method tracy_force_inline (line 874) | tracy_force_inline bool NeedDataSize( size_t len )
method tracy_force_inline (line 885) | tracy_force_inline void AppendDataUnsafe( const void* data, size_t l...
method WithSafeCopy (line 895) | bool WithSafeCopy( const char* p, size_t size, Callable&& callable )
method tracy_force_inline (line 933) | static tracy_force_inline void SendCallstackSerial( void* ptr )
method tracy_force_inline (line 944) | static tracy_force_inline void SendMemAlloc( QueueType type, const u...
method tracy_force_inline (line 967) | static tracy_force_inline void SendMemFree( QueueType type, const ui...
method tracy_force_inline (line 979) | static tracy_force_inline void SendMemDiscard( QueueType type, const...
method tracy_force_inline (line 991) | static tracy_force_inline void SendMemName( const char* name )
method ProcessSysTime (line 1058) | void ProcessSysTime() {}
type sigaction (line 1089) | struct sigaction
class Socket (line 66) | class Socket
class UdpBroadcast (line 67) | class UdpBroadcast
type GpuCtxWrapper (line 69) | struct GpuCtxWrapper
function tracy_force_inline (line 88) | tracy_force_inline bool HardwareSupportsInvariantTSC()
function tracy_force_inline (line 93) | tracy_force_inline bool HardwareSupportsInvariantTSC()
type SourceLocationData (line 101) | struct SourceLocationData
type LuaZoneState (line 111) | struct LuaZoneState
class Profiler (line 164) | class Profiler
type FrameImageQueueItem (line 166) | struct FrameImageQueueItem
type SymbolQueueItemType (line 175) | enum class SymbolQueueItemType
type SymbolQueueItem (line 184) | struct SymbolQueueItem
method tracy_force_inline (line 198) | static tracy_force_inline int64_t GetTime()
method tracy_force_inline (line 261) | tracy_force_inline uint32_t GetNextZoneId()
method tracy_force_inline (line 266) | static tracy_force_inline QueueItem* QueueSerial()
method tracy_force_inline (line 273) | static tracy_force_inline QueueItem* QueueSerialCallstack( void* ptr )
method tracy_force_inline (line 281) | static tracy_force_inline void QueueSerialFinish()
method tracy_force_inline (line 288) | static tracy_force_inline void SendFrameMark( const char* name )
method tracy_force_inline (line 301) | static tracy_force_inline void SendFrameMark( const char* name, Queu...
method tracy_force_inline (line 314) | static tracy_force_inline void SendFrameImage( const void* image, ui...
method tracy_force_inline (line 344) | static tracy_force_inline void PlotData( const char* name, int64_t v...
method tracy_force_inline (line 356) | static tracy_force_inline void PlotData( const char* name, float val )
method tracy_force_inline (line 368) | static tracy_force_inline void PlotData( const char* name, double val )
method tracy_force_inline (line 380) | static tracy_force_inline void ConfigurePlot( const char* name, Plot...
method tracy_force_inline (line 396) | static tracy_force_inline void Message( const char* txt, size_t size...
method tracy_force_inline (line 417) | static tracy_force_inline void Message( const char* txt, int32_t cal...
method tracy_force_inline (line 433) | static tracy_force_inline void MessageColor( const char* txt, size_t...
method tracy_force_inline (line 457) | static tracy_force_inline void MessageColor( const char* txt, uint32...
method tracy_force_inline (line 476) | static tracy_force_inline void MessageAppInfo( const char* txt, size...
method tracy_force_inline (line 493) | static tracy_force_inline void MemAlloc( const void* ptr, size_t siz...
method tracy_force_inline (line 506) | static tracy_force_inline void MemFree( const void* ptr, bool secure )
method tracy_force_inline (line 519) | static tracy_force_inline void MemAllocCallstack( const void* ptr, s...
method tracy_force_inline (line 543) | static tracy_force_inline void MemFreeCallstack( const void* ptr, in...
method tracy_force_inline (line 572) | static tracy_force_inline void MemAllocNamed( const void* ptr, size_...
method tracy_force_inline (line 586) | static tracy_force_inline void MemFreeNamed( const void* ptr, bool s...
method tracy_force_inline (line 600) | static tracy_force_inline void MemAllocCallstackNamed( const void* p...
method tracy_force_inline (line 625) | static tracy_force_inline void MemFreeCallstackNamed( const void* pt...
method tracy_force_inline (line 650) | static tracy_force_inline void MemDiscard( const char* name, bool se...
method tracy_force_inline (line 663) | static tracy_force_inline void MemDiscardCallstack( const char* name...
method tracy_force_inline (line 686) | static tracy_force_inline void SendCallstack( int32_t depth )
method tracy_force_inline (line 697) | static tracy_force_inline void ParameterRegister( ParameterCallback ...
method tracy_force_inline (line 704) | static tracy_force_inline void ParameterSetup( uint32_t idx, const c...
method tracy_force_inline (line 719) | static tracy_force_inline void SourceCallbackRegister( SourceContent...
method tracy_force_inline (line 727) | static tracy_force_inline void EnterFiber( const char* fiber, int32_...
method tracy_force_inline (line 739) | static tracy_force_inline void LeaveFiber()
method tracy_force_inline (line 755) | tracy_force_inline bool IsConnected() const
method tracy_force_inline (line 760) | tracy_force_inline void SetProgramName( const char* name )
method tracy_force_inline (line 768) | tracy_force_inline uint64_t ConnectionId() const
method tracy_force_inline (line 773) | tracy_force_inline void DeferItem( const QueueItem& item )
method RequestShutdown (line 782) | void RequestShutdown() { m_shutdown.store( true, std::memory_order_r...
method HasShutdownFinished (line 783) | bool HasShutdownFinished() const { return m_shutdownFinished.load( s...
method SendString (line 785) | void SendString( uint64_t str, const char* ptr, QueueType type ) { S...
method SendSingleString (line 787) | void SendSingleString( const char* ptr ) { SendSingleString( ptr, st...
method SendSecondString (line 789) | void SendSecondString( const char* ptr ) { SendSecondString( ptr, st...
method tracy_force_inline (line 803) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
method tracy_force_inline (line 808) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
method tracy_force_inline (line 813) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
method tracy_force_inline (line 818) | static tracy_force_inline uint64_t AllocSourceLocation( uint32_t lin...
type DequeueStatus (line 839) | enum class DequeueStatus { DataDequeued, ConnectionLost, QueueEmpty }
type ThreadCtxStatus (line 840) | enum class ThreadCtxStatus { Same, Changed, ConnectionLost }
method LaunchWorker (line 842) | static void LaunchWorker( void* ptr ) { ((Profiler*)ptr)->Worker(); }
method LaunchCompressWorker (line 846) | static void LaunchCompressWorker( void* ptr ) { ((Profiler*)ptr)->Co...
method LaunchSymbolWorker (line 851) | static void LaunchSymbolWorker( void* ptr ) { ((Profiler*)ptr)->Symb...
method tracy_force_inline (line 867) | tracy_force_inline bool AppendData( const void* data, size_t len )
method tracy_force_inline (line 874) | tracy_force_inline bool NeedDataSize( size_t len )
method tracy_force_inline (line 885) | tracy_force_inline void AppendDataUnsafe( const void* data, size_t l...
method WithSafeCopy (line 895) | bool WithSafeCopy( const char* p, size_t size, Callable&& callable )
method tracy_force_inline (line 933) | static tracy_force_inline void SendCallstackSerial( void* ptr )
method tracy_force_inline (line 944) | static tracy_force_inline void SendMemAlloc( QueueType type, const u...
method tracy_force_inline (line 967) | static tracy_force_inline void SendMemFree( QueueType type, const ui...
method tracy_force_inline (line 979) | static tracy_force_inline void SendMemDiscard( QueueType type, const...
method tracy_force_inline (line 991) | static tracy_force_inline void SendMemName( const char* name )
method ProcessSysTime (line 1058) | void ProcessSysTime() {}
type sigaction (line 1089) | struct sigaction
FILE: tracy-client-sys/tracy/client/TracyRingBuffer.hpp
type tracy (line 13) | namespace tracy
class RingBuffer (line 16) | class RingBuffer
method RingBuffer (line 19) | RingBuffer( unsigned int size, int fd, int id, int cpu = -1 )
method RingBuffer (line 50) | RingBuffer( const RingBuffer& ) = delete;
method RingBuffer (line 51) | RingBuffer& operator=( const RingBuffer& ) = delete;
method RingBuffer (line 53) | RingBuffer( RingBuffer&& other )
method RingBuffer (line 60) | RingBuffer& operator=( RingBuffer&& other )
method IsValid (line 68) | bool IsValid() const { return m_metadata != nullptr; }
method GetId (line 69) | int GetId() const { return m_id; }
method GetCpu (line 70) | int GetCpu() const { return m_cpu; }
method Enable (line 72) | void Enable()
method Read (line 77) | void Read( void* dst, uint64_t offset, uint64_t cnt )
method Advance (line 94) | void Advance( uint64_t cnt )
method CheckTscCaps (line 100) | bool CheckTscCaps() const
method ConvertTimeToTsc (line 105) | int64_t ConvertTimeToTsc( int64_t timestamp ) const
method LoadHead (line 114) | uint64_t LoadHead() const
method GetTail (line 119) | uint64_t GetTail() const
method StoreTail (line 125) | void StoreTail()
FILE: tracy-client-sys/tracy/client/TracyRocprof.cpp
type DispatchData (line 37) | struct DispatchData
type ToolData (line 45) | struct ToolData
function rocprofiler_context_id_t (line 64) | rocprofiler_context_id_t& get_client_ctx()
function gpu_context_allocate (line 72) | uint8_t gpu_context_allocate( ToolData* data )
function kernel_src_loc (line 130) | uint64_t kernel_src_loc( ToolData* data, uint64_t kernel_id )
function record_interval (line 146) | void record_interval( ToolData* data, rocprofiler_timestamp_t start_time...
function record_callback (line 236) | void record_callback( rocprofiler_dispatch_counting_service_data_t dispa...
function dispatch_callback (line 283) | void dispatch_callback( rocprofiler_dispatch_counting_service_data_t dis...
function tool_callback_tracing_callback (line 378) | void tool_callback_tracing_callback( rocprofiler_callback_tracing_record...
function calibration_thread (line 450) | void calibration_thread( void* ptr )
function tool_init (line 493) | int tool_init( rocprofiler_client_finalize_t fini_func, void* user_data )
function tool_fini (line 526) | void tool_fini( void* tool_data_v )
function rocprofiler_tool_configure_result_t (line 538) | rocprofiler_tool_configure_result_t* rocprofiler_configure( uint32_t ver...
FILE: tracy-client-sys/tracy/client/TracyScoped.hpp
type tracy (line 21) | namespace tracy
class ScopedZone (line 24) | class ScopedZone
method ScopedZone (line 27) | ScopedZone( const ScopedZone& ) = delete;
method ScopedZone (line 28) | ScopedZone( ScopedZone&& ) = delete;
method ScopedZone (line 29) | ScopedZone& operator=( const ScopedZone& ) = delete;
method ScopedZone (line 30) | ScopedZone& operator=( ScopedZone&& ) = delete;
method tracy_force_inline (line 32) | tracy_force_inline ScopedZone( const SourceLocationData* srcloc, int...
method m_active (line 57) | m_active( is_active && GetProfiler().IsConnected() )
method tracy_force_inline (line 80) | tracy_force_inline ScopedZone( uint32_t line, const char* source, si...
method tracy_force_inline (line 82) | tracy_force_inline ~ScopedZone()
method tracy_force_inline (line 93) | tracy_force_inline void Text( const char* txt, size_t size )
FILE: tracy-client-sys/tracy/client/TracyStringHelpers.hpp
type tracy (line 10) | namespace tracy
function tracy_force_inline (line 13) | static tracy_force_inline char* CopyString( const char* src, size_t sz )
function tracy_force_inline (line 21) | static tracy_force_inline char* CopyString( const char* src )
function tracy_force_inline (line 26) | static tracy_force_inline char* CopyStringFast( const char* src, size_...
function tracy_force_inline (line 34) | static tracy_force_inline char* CopyStringFast( const char* src )
FILE: tracy-client-sys/tracy/client/TracySysPower.cpp
type tracy (line 16) | namespace tracy
type dirent (line 73) | struct dirent
FILE: tracy-client-sys/tracy/client/TracySysPower.hpp
type tracy (line 15) | namespace tracy
class SysPower (line 18) | class SysPower
type Domain (line 20) | struct Domain
FILE: tracy-client-sys/tracy/client/TracySysTime.cpp
type tracy (line 19) | namespace tracy
function ConvertTime (line 24) | static inline uint64_t ConvertTime( const FILETIME& t )
FILE: tracy-client-sys/tracy/client/TracySysTime.hpp
type tracy (line 18) | namespace tracy
class SysTime (line 21) | class SysTime
FILE: tracy-client-sys/tracy/client/TracySysTrace.cpp
type tracy (line 16) | namespace tracy
function GetSamplingFrequency (line 19) | static int GetSamplingFrequency()
function GetSamplingPeriod (line 37) | static int GetSamplingPeriod()
type CSwitch (line 83) | struct CSwitch
type ReadyThread (line 99) | struct ReadyThread
type ThreadTrace (line 108) | struct ThreadTrace
type StackWalkEvent (line 122) | struct StackWalkEvent
type VSyncInfo (line 130) | struct VSyncInfo
function EventRecordCallback (line 157) | void WINAPI EventRecordCallback( PEVENT_RECORD record )
function EventRecordCallbackVsync (line 234) | void WINAPI EventRecordCallbackVsync( PEVENT_RECORD record )
function SetupVsync (line 256) | static void SetupVsync()
function GetSamplingInterval (line 343) | static int GetSamplingInterval()
function SysTraceStart (line 348) | bool SysTraceStart( int64_t& samplingPeriod )
function SysTraceStop (line 474) | void SysTraceStop()
function SysTraceWorker (line 488) | void SysTraceWorker( void* ptr )
function SysTraceGetExternalName (line 498) | void SysTraceGetExternalName( uint64_t thread, const char*& threadName...
function CurrentProcOwnsThread (line 652) | static bool CurrentProcOwnsThread( uint32_t tid )
function perf_event_open (line 674) | static int perf_event_open( struct perf_event_attr* hw_event, pid_t pi...
type TraceEventId (line 679) | enum TraceEventId
function ProbePreciseIp (line 693) | static void ProbePreciseIp( perf_event_attr& pe, unsigned long long co...
function ProbePreciseIp (line 721) | static void ProbePreciseIp( perf_event_attr& pe, pid_t pid )
function IsGenuineIntel (line 737) | static bool IsGenuineIntel()
function SysTraceStart (line 801) | bool SysTraceStart( int64_t& samplingPeriod )
function SysTraceStop (line 1171) | void SysTraceStop()
function SysTraceWorker (line 1213) | void SysTraceWorker( void* ptr )
function SysTraceGetExternalName (line 1620) | void SysTraceGetExternalName( uint64_t thread, const char*& threadName...
type tracy (line 65) | namespace tracy
function GetSamplingFrequency (line 19) | static int GetSamplingFrequency()
function GetSamplingPeriod (line 37) | static int GetSamplingPeriod()
type CSwitch (line 83) | struct CSwitch
type ReadyThread (line 99) | struct ReadyThread
type ThreadTrace (line 108) | struct ThreadTrace
type StackWalkEvent (line 122) | struct StackWalkEvent
type VSyncInfo (line 130) | struct VSyncInfo
function EventRecordCallback (line 157) | void WINAPI EventRecordCallback( PEVENT_RECORD record )
function EventRecordCallbackVsync (line 234) | void WINAPI EventRecordCallbackVsync( PEVENT_RECORD record )
function SetupVsync (line 256) | static void SetupVsync()
function GetSamplingInterval (line 343) | static int GetSamplingInterval()
function SysTraceStart (line 348) | bool SysTraceStart( int64_t& samplingPeriod )
function SysTraceStop (line 474) | void SysTraceStop()
function SysTraceWorker (line 488) | void SysTraceWorker( void* ptr )
function SysTraceGetExternalName (line 498) | void SysTraceGetExternalName( uint64_t thread, const char*& threadName...
function CurrentProcOwnsThread (line 652) | static bool CurrentProcOwnsThread( uint32_t tid )
function perf_event_open (line 674) | static int perf_event_open( struct perf_event_attr* hw_event, pid_t pi...
type TraceEventId (line 679) | enum TraceEventId
function ProbePreciseIp (line 693) | static void ProbePreciseIp( perf_event_attr& pe, unsigned long long co...
function ProbePreciseIp (line 721) | static void ProbePreciseIp( perf_event_attr& pe, pid_t pid )
function IsGenuineIntel (line 737) | static bool IsGenuineIntel()
function SysTraceStart (line 801) | bool SysTraceStart( int64_t& samplingPeriod )
function SysTraceStop (line 1171) | void SysTraceStop()
function SysTraceWorker (line 1213) | void SysTraceWorker( void* ptr )
function SysTraceGetExternalName (line 1620) | void SysTraceGetExternalName( uint64_t thread, const char*& threadName...
type tracy (line 639) | namespace tracy
function GetSamplingFrequency (line 19) | static int GetSamplingFrequency()
function GetSamplingPeriod (line 37) | static int GetSamplingPeriod()
type CSwitch (line 83) | struct CSwitch
type ReadyThread (line 99) | struct ReadyThread
type ThreadTrace (line 108) | struct ThreadTrace
type StackWalkEvent (line 122) | struct StackWalkEvent
type VSyncInfo (line 130) | struct VSyncInfo
function EventRecordCallback (line 157) | void WINAPI EventRecordCallback( PEVENT_RECORD record )
function EventRecordCallbackVsync (line 234) | void WINAPI EventRecordCallbackVsync( PEVENT_RECORD record )
function SetupVsync (line 256) | static void SetupVsync()
function GetSamplingInterval (line 343) | static int GetSamplingInterval()
function SysTraceStart (line 348) | bool SysTraceStart( int64_t& samplingPeriod )
function SysTraceStop (line 474) | void SysTraceStop()
function SysTraceWorker (line 488) | void SysTraceWorker( void* ptr )
function SysTraceGetExternalName (line 498) | void SysTraceGetExternalName( uint64_t thread, const char*& threadName...
function CurrentProcOwnsThread (line 652) | static bool CurrentProcOwnsThread( uint32_t tid )
function perf_event_open (line 674) | static int perf_event_open( struct perf_event_attr* hw_event, pid_t pi...
type TraceEventId (line 679) | enum TraceEventId
function ProbePreciseIp (line 693) | static void ProbePreciseIp( perf_event_attr& pe, unsigned long long co...
function ProbePreciseIp (line 721) | static void ProbePreciseIp( perf_event_attr& pe, pid_t pid )
function IsGenuineIntel (line 737) | static bool IsGenuineIntel()
function SysTraceStart (line 801) | bool SysTraceStart( int64_t& samplingPeriod )
function SysTraceStop (line 1171) | void SysTraceStop()
function SysTraceWorker (line 1213) | void SysTraceWorker( void* ptr )
function SysTraceGetExternalName (line 1620) | void SysTraceGetExternalName( uint64_t thread, const char*& threadName...
FILE: tracy-client-sys/tracy/client/TracySysTrace.hpp
type tracy (line 15) | namespace tracy
FILE: tracy-client-sys/tracy/client/TracyThread.hpp
type tracy (line 14) | namespace tracy
class ThreadExitHandler (line 21) | class ThreadExitHandler
class Thread (line 35) | class Thread
method Thread (line 38) | Thread( void(*func)( void* ptr ), void* ptr )
method HANDLE (line 50) | HANDLE Handle() const { return m_hnd; }
method DWORD (line 53) | static DWORD WINAPI Launch( void* ptr ) { ((Thread*)ptr)->m_func( ((...
method Thread (line 65) | Thread( void(*func)( void* ptr ), void* ptr )
method pthread_t (line 77) | pthread_t Handle() const { return m_thread; }
class Thread (line 62) | class Thread
method Thread (line 38) | Thread( void(*func)( void* ptr ), void* ptr )
method HANDLE (line 50) | HANDLE Handle() const { return m_hnd; }
method DWORD (line 53) | static DWORD WINAPI Launch( void* ptr ) { ((Thread*)ptr)->m_func( ((...
method Thread (line 65) | Thread( void(*func)( void* ptr ), void* ptr )
method pthread_t (line 77) | pthread_t Handle() const { return m_thread; }
FILE: tracy-client-sys/tracy/client/tracy_SPSCQueue.h
function namespace (line 38) | namespace tracy {
FILE: tracy-client-sys/tracy/client/tracy_concurrentqueue.h
function namespace (line 66) | namespace moodycamel { namespace details {
type compile_time_condition (line 85) | struct compile_time_condition
function namespace (line 91) | namespace moodycamel {
type ProducerToken (line 192) | struct ProducerToken
type ConsumerToken (line 193) | struct ConsumerToken
FILE: tracy-client-sys/tracy/client/tracy_rpmalloc.cpp
function FORCEINLINE (line 228) | static FORCEINLINE int32_t atomic_load32(atomic32_t* src) { return std::...
function FORCEINLINE (line 229) | static FORCEINLINE void atomic_store32(atomic32_t* dst, int32_t val) ...
function FORCEINLINE (line 230) | static FORCEINLINE int32_t atomic_incr32(atomic32_t* val) { return std::...
function FORCEINLINE (line 231) | static FORCEINLINE int32_t atomic_decr32(atomic32_t* val) { return std::...
function FORCEINLINE (line 232) | static FORCEINLINE int32_t atomic_add32(atomic32_t* val, int32_t add) { ...
function FORCEINLINE (line 233) | static FORCEINLINE int atomic_cas32_acquire(atomic32_t* dst, int32_t...
function FORCEINLINE (line 234) | static FORCEINLINE void atomic_store32_release(atomic32_t* dst, int32...
function FORCEINLINE (line 235) | static FORCEINLINE int64_t atomic_load64(atomic64_t* val) { return std::...
function FORCEINLINE (line 236) | static FORCEINLINE int64_t atomic_add64(atomic64_t* val, int64_t add) { ...
function FORCEINLINE (line 237) | static FORCEINLINE void* atomic_load_ptr(atomicptr_t* src) { return st...
function FORCEINLINE (line 238) | static FORCEINLINE void atomic_store_ptr(atomicptr_t* dst, void* val)...
function FORCEINLINE (line 239) | static FORCEINLINE void atomic_store_ptr_release(atomicptr_t* dst, vo...
function FORCEINLINE (line 240) | static FORCEINLINE void* atomic_exchange_ptr_acquire(atomicptr_t* dst,...
function FORCEINLINE (line 241) | static FORCEINLINE int atomic_cas_ptr(atomicptr_t* dst, void* val, v...
type heap_t (line 354) | struct heap_t
type span_t (line 356) | struct span_t
type span_list_t (line 358) | struct span_list_t
type span_active_t (line 360) | struct span_active_t
type size_class_t (line 362) | struct size_class_t
type global_cache_t (line 364) | struct global_cache_t
type span_use_t (line 376) | struct span_use_t {
type span_use_t (line 400) | struct span_use_t
type size_class_use_t (line 404) | struct size_class_use_t {
type size_class_use_t (line 427) | struct size_class_use_t
type span_t (line 438) | struct span_t {
type span_cache_t (line 476) | struct span_cache_t {
type span_cache_t (line 480) | struct span_cache_t
type span_large_cache_t (line 482) | struct span_large_cache_t {
type span_large_cache_t (line 486) | struct span_large_cache_t
type heap_size_class_t (line 488) | struct heap_size_class_t {
type heap_size_class_t (line 497) | struct heap_size_class_t
type heap_t (line 500) | struct heap_t {
type size_class_t (line 557) | struct size_class_t {
type global_cache_t (line 567) | struct global_cache_t {
function heap_t (line 707) | static inline heap_t*
function heap_t (line 717) | static inline heap_t*
function get_thread_id (line 731) | static inline uintptr_t
function set_thread_heap (line 764) | static void
function rpmalloc_set_main_thread (line 779) | void
function _rpmalloc_spin (line 784) | static void
function _rpmalloc_thread_destructor (line 803) | static void NTAPI
function _rpmalloc_set_name (line 823) | static void
function _rpmalloc_unmap (line 860) | static void
function span_t (line 996) | static span_t*
function _rpmalloc_global_set_reserved_spans (line 1009) | static void
function _rpmalloc_span_double_link_list_add (line 1024) | static void
function _rpmalloc_span_double_link_list_pop_head (line 1033) | static void
function _rpmalloc_span_double_link_list_remove (line 1041) | static void
function _rpmalloc_span_mark_as_subspan_unless_master (line 1072) | static void
function span_t (line 1084) | static span_t*
function _rpmalloc_span_align_count (line 1099) | static size_t
function _rpmalloc_span_initialize (line 1108) | static void
function span_t (line 1121) | static span_t*
function span_t (line 1159) | static span_t*
function _rpmalloc_span_unmap (line 1192) | static void
function _rpmalloc_span_release_to_cache (line 1228) | static void
function free_list_partial_init (line 1250) | static uint32_t
function _rpmalloc_span_extract_free_list_deferred (line 1311) | static void
function _rpmalloc_span_is_fully_utilized (line 1323) | static int
function _rpmalloc_span_finalize (line 1329) | static int
function _rpmalloc_global_cache_finalize (line 1379) | static void
function _rpmalloc_global_cache_insert_spans (line 1397) | static void
FILE: tracy-client-sys/tracy/client/tracy_rpmalloc.hpp
type tracy (line 17) | namespace tracy
type rpmalloc_global_statistics_t (line 68) | struct rpmalloc_global_statistics_t {
type rpmalloc_thread_statistics_t (line 85) | struct rpmalloc_thread_statistics_t {
type rpmalloc_config_t (line 136) | struct rpmalloc_config_t {
type heap_t (line 298) | struct heap_t
FILE: tracy-client-sys/tracy/common/TracyAlign.hpp
type tracy (line 8) | namespace tracy
function tracy_force_inline (line 12) | tracy_force_inline T MemRead( const void* ptr )
function tracy_force_inline (line 20) | tracy_force_inline void MemWrite( void* ptr, T val )
FILE: tracy-client-sys/tracy/common/TracyAlloc.hpp
type tracy (line 13) | namespace tracy
function InitRpmalloc (line 19) | static inline void InitRpmalloc() {}
function tracy_free (line 41) | static inline void tracy_free( void* ptr )
function tracy_free_fast (line 51) | static inline void tracy_free_fast( void* ptr )
FILE: tracy-client-sys/tracy/common/TracyColor.hpp
type tracy (line 4) | namespace tracy
type Color (line 6) | struct Color
type ColorType (line 8) | enum ColorType
FILE: tracy-client-sys/tracy/common/TracyMutex.hpp
type tracy (line 8) | namespace tracy
type tracy (line 17) | namespace tracy
FILE: tracy-client-sys/tracy/common/TracyProtocol.hpp
type tracy (line 7) | namespace tracy
function Lz4CompressBound (line 10) | constexpr unsigned Lz4CompressBound( unsigned isize ) { return isize +...
type HandshakeStatus (line 25) | enum HandshakeStatus : uint8_t
type ServerQuery (line 40) | enum ServerQuery : uint8_t
type ServerQueryPacket (line 61) | struct ServerQueryPacket
type CpuArchitecture (line 71) | enum CpuArchitecture : uint8_t
type WelcomeFlag (line 81) | struct WelcomeFlag
type _t (line 83) | enum _t : uint8_t
type WelcomeMessage (line 93) | struct WelcomeMessage
type OnDemandPayloadMessage (line 114) | struct OnDemandPayloadMessage
type BroadcastMessage (line 123) | struct BroadcastMessage
type BroadcastMessage_v2 (line 133) | struct BroadcastMessage_v2
type BroadcastMessage_v1 (line 142) | struct BroadcastMessage_v1
type BroadcastMessage_v0 (line 151) | struct BroadcastMessage_v0
FILE: tracy-client-sys/tracy/common/TracyQueue.hpp
type tracy (line 7) | namespace tracy
type QueueType (line 10) | enum class QueueType : uint8_t
type QueueThreadContext (line 134) | struct QueueThreadContext
type QueueZoneBeginLean (line 139) | struct QueueZoneBeginLean
type QueueZoneBegin (line 144) | struct QueueZoneBegin : public QueueZoneBeginLean
type QueueZoneBeginThread (line 149) | struct QueueZoneBeginThread : public QueueZoneBegin
type QueueZoneEnd (line 154) | struct QueueZoneEnd
type QueueZoneEndThread (line 159) | struct QueueZoneEndThread : public QueueZoneEnd
type QueueZoneValidation (line 164) | struct QueueZoneValidation
type QueueZoneValidationThread (line 169) | struct QueueZoneValidationThread : public QueueZoneValidation
type QueueZoneColor (line 174) | struct QueueZoneColor
type QueueZoneColorThread (line 181) | struct QueueZoneColorThread : public QueueZoneColor
type QueueZoneValue (line 186) | struct QueueZoneValue
type QueueZoneValueThread (line 191) | struct QueueZoneValueThread : public QueueZoneValue
type QueueStringTransfer (line 196) | struct QueueStringTransfer
type QueueFrameMark (line 201) | struct QueueFrameMark
type QueueFrameVsync (line 207) | struct QueueFrameVsync
type QueueFrameImage (line 213) | struct QueueFrameImage
type QueueFrameImageFat (line 221) | struct QueueFrameImageFat : public QueueFrameImage
type QueueSourceLocation (line 226) | struct QueueSourceLocation
type QueueZoneTextFat (line 237) | struct QueueZoneTextFat
type QueueZoneTextFatThread (line 243) | struct QueueZoneTextFatThread : public QueueZoneTextFat
type LockType (line 248) | enum class LockType : uint8_t
type QueueLockAnnounce (line 254) | struct QueueLockAnnounce
type QueueFiberEnter (line 262) | struct QueueFiberEnter
type QueueFiberLeave (line 270) | struct QueueFiberLeave
type QueueLockTerminate (line 276) | struct QueueLockTerminate
type QueueLockWait (line 282) | struct QueueLockWait
type QueueLockObtain (line 289) | struct QueueLockObtain
type QueueLockRelease (line 296) | struct QueueLockRelease
type QueueLockReleaseShared (line 302) | struct QueueLockReleaseShared : public QueueLockRelease
type QueueLockMark (line 307) | struct QueueLockMark
type QueueLockName (line 314) | struct QueueLockName
type QueueLockNameFat (line 319) | struct QueueLockNameFat : public QueueLockName
type QueuePlotDataBase (line 325) | struct QueuePlotDataBase
type QueuePlotDataInt (line 331) | struct QueuePlotDataInt : public QueuePlotDataBase
type QueuePlotDataFloat (line 336) | struct QueuePlotDataFloat : public QueuePlotDataBase
type QueuePlotDataDouble (line 341) | struct QueuePlotDataDouble : public QueuePlotDataBase
type QueueMessage (line 346) | struct QueueMessage
type QueueMessageColor (line 351) | struct QueueMessageColor : public QueueMessage
type QueueMessageLiteral (line 358) | struct QueueMessageLiteral : public QueueMessage
type QueueMessageLiteralThread (line 363) | struct QueueMessageLiteralThread : public QueueMessageLiteral
type QueueMessageColorLiteral (line 368) | struct QueueMessageColorLiteral : public QueueMessageColor
type QueueMessageColorLiteralThread (line 373) | struct QueueMessageColorLiteralThread : public QueueMessageColorLiteral
type QueueMessageFat (line 378) | struct QueueMessageFat : public QueueMessage
type QueueMessageFatThread (line 384) | struct QueueMessageFatThread : public QueueMessageFat
type QueueMessageColorFat (line 389) | struct QueueMessageColorFat : public QueueMessageColor
type QueueMessageColorFatThread (line 395) | struct QueueMessageColorFatThread : public QueueMessageColorFat
type GpuContextType (line 401) | enum class GpuContextType : uint8_t
type GpuContextFlags (line 415) | enum GpuContextFlags : uint8_t
type QueueGpuNewContext (line 420) | struct QueueGpuNewContext
type QueueGpuZoneBeginLean (line 431) | struct QueueGpuZoneBeginLean
type QueueGpuZoneBegin (line 439) | struct QueueGpuZoneBegin : public QueueGpuZoneBeginLean
type QueueGpuZoneEnd (line 444) | struct QueueGpuZoneEnd
type QueueGpuZoneAnnotation (line 452) | struct QueueGpuZoneAnnotation
type QueueGpuTime (line 461) | struct QueueGpuTime
type QueueGpuCalibration (line 468) | struct QueueGpuCalibration
type QueueGpuTimeSync (line 476) | struct QueueGpuTimeSync
type QueueGpuContextName (line 483) | struct QueueGpuContextName
type QueueGpuContextNameFat (line 488) | struct QueueGpuContextNameFat : public QueueGpuContextName
type QueueGpuAnnotationName (line 494) | struct QueueGpuAnnotationName
type QueueGpuAnnotationNameFat (line 500) | struct QueueGpuAnnotationNameFat : public QueueGpuAnnotationName
type QueueMemNamePayload (line 506) | struct QueueMemNamePayload
type QueueThreadGroupHint (line 511) | struct QueueThreadGroupHint
type QueueMemAlloc (line 517) | struct QueueMemAlloc
type QueueMemFree (line 525) | struct QueueMemFree
type QueueMemDiscard (line 532) | struct QueueMemDiscard
type QueueCallstackFat (line 539) | struct QueueCallstackFat
type QueueCallstackFatThread (line 544) | struct QueueCallstackFatThread : public QueueCallstackFat
type QueueCallstackAllocFat (line 549) | struct QueueCallstackAllocFat
type QueueCallstackAllocFatThread (line 555) | struct QueueCallstackAllocFatThread : public QueueCallstackAllocFat
type QueueCallstackSample (line 560) | struct QueueCallstackSample
type QueueCallstackSampleFat (line 566) | struct QueueCallstackSampleFat : public QueueCallstackSample
type QueueCallstackFrameSize (line 571) | struct QueueCallstackFrameSize
type QueueCallstackFrameSizeFat (line 577) | struct QueueCallstackFrameSizeFat : public QueueCallstackFrameSize
type QueueCallstackFrame (line 583) | struct QueueCallstackFrame
type QueueSymbolInformation (line 590) | struct QueueSymbolInformation
type QueueSymbolInformationFat (line 596) | struct QueueSymbolInformationFat : public QueueSymbolInformation
type QueueCrashReport (line 602) | struct QueueCrashReport
type QueueCrashReportThread (line 608) | struct QueueCrashReportThread
type QueueSysTime (line 613) | struct QueueSysTime
type QueueSysPower (line 619) | struct QueueSysPower
type QueueContextSwitch (line 626) | struct QueueContextSwitch
type QueueThreadWakeup (line 639) | struct QueueThreadWakeup
type QueueTidToPid (line 648) | struct QueueTidToPid
type QueueHwSample (line 654) | struct QueueHwSample
type PlotFormatType (line 660) | enum class PlotFormatType : uint8_t
type QueuePlotConfig (line 667) | struct QueuePlotConfig
type QueueParamSetup (line 676) | struct QueueParamSetup
type QueueSourceCodeNotAvailable (line 684) | struct QueueSourceCodeNotAvailable
type QueueCpuTopology (line 689) | struct QueueCpuTopology
type QueueExternalNameMetadata (line 697) | struct QueueExternalNameMetadata
type QueueSymbolCodeMetadata (line 704) | struct QueueSymbolCodeMetadata
type QueueSourceCodeMetadata (line 711) | struct QueueSourceCodeMetadata
type QueueHeader (line 718) | struct QueueHeader
type QueueItem (line 727) | struct QueueItem
FILE: tracy-client-sys/tracy/common/TracySocket.cpp
type tracy (line 43) | namespace tracy
type __wsinit (line 53) | struct __wsinit
method __wsinit (line 55) | __wsinit()
function InitWinSock (line 66) | void InitWinSock()
type addrinfo (line 159) | struct addrinfo
type addrinfo (line 160) | struct addrinfo
type addrinfo (line 231) | struct addrinfo
type addrinfo (line 232) | struct addrinfo
type pollfd (line 345) | struct pollfd
type pollfd (line 428) | struct pollfd
function addrinfo_and_socket_for_family (line 454) | static int addrinfo_and_socket_for_family( uint16_t port, int ai_famil...
type addrinfo (line 479) | struct addrinfo
function Socket (line 513) | Socket* ListenSocket::Accept()
type addrinfo (line 570) | struct addrinfo
type addrinfo (line 571) | struct addrinfo
type sockaddr_in (line 628) | struct sockaddr_in
type sockaddr (line 645) | struct sockaddr
type sockaddr_in (line 648) | struct sockaddr_in
type sockaddr_in (line 652) | struct sockaddr_in
type sockaddr_in (line 705) | struct sockaddr_in
type pollfd (line 739) | struct pollfd
type sockaddr (line 745) | struct sockaddr
FILE: tracy-client-sys/tracy/common/TracySocket.hpp
type addrinfo (line 8) | struct addrinfo
type sockaddr (line 9) | struct sockaddr
type tracy (line 11) | namespace tracy
class Socket (line 18) | class Socket
method Read (line 36) | bool Read( void* buf, int len, int timeout, ShouldExit exitCb )
method Socket (line 51) | Socket( const Socket& ) = delete;
method Socket (line 52) | Socket( Socket&& ) = delete;
method Socket (line 53) | Socket& operator=( const Socket& ) = delete;
method Socket (line 54) | Socket& operator=( Socket&& ) = delete;
type addrinfo (line 67) | struct addrinfo
type addrinfo (line 68) | struct addrinfo
class ListenSocket (line 72) | class ListenSocket
method ListenSocket (line 82) | ListenSocket( const ListenSocket& ) = delete;
method ListenSocket (line 83) | ListenSocket( ListenSocket&& ) = delete;
method ListenSocket (line 84) | ListenSocket& operator=( const ListenSocket& ) = delete;
method ListenSocket (line 85) | ListenSocket& operator=( ListenSocket&& ) = delete;
class UdpBroadcast (line 91) | class UdpBroadcast
method UdpBroadcast (line 102) | UdpBroadcast( const UdpBroadcast& ) = delete;
method UdpBroadcast (line 103) | UdpBroadcast( UdpBroadcast&& ) = delete;
method UdpBroadcast (line 104) | UdpBroadcast& operator=( const UdpBroadcast& ) = delete;
method UdpBroadcast (line 105) | UdpBroadcast& operator=( UdpBroadcast&& ) = delete;
class IpAddress (line 112) | class IpAddress
type sockaddr (line 118) | struct sockaddr
method GetNumber (line 120) | uint32_t GetNumber() const { return m_number; }
method IpAddress (line 123) | IpAddress( const IpAddress& ) = delete;
method IpAddress (line 124) | IpAddress( IpAddress&& ) = delete;
method IpAddress (line 125) | IpAddress& operator=( const IpAddress& ) = delete;
method IpAddress (line 126) | IpAddress& operator=( IpAddress&& ) = delete;
class UdpListen (line 133) | class UdpListen
method UdpListen (line 144) | UdpListen( const UdpListen& ) = delete;
method UdpListen (line 145) | UdpListen( UdpListen&& ) = delete;
method UdpListen (line 146) | UdpListen& operator=( const UdpListen& ) = delete;
method UdpListen (line 147) | UdpListen& operator=( UdpListen&& ) = delete;
FILE: tracy-client-sys/tracy/common/TracyStackFrames.cpp
type tracy (line 3) | namespace tracy
FILE: tracy-client-sys/tracy/common/TracyStackFrames.hpp
type tracy (line 6) | namespace tracy
type StringMatch (line 9) | struct StringMatch
FILE: tracy-client-sys/tracy/common/TracySystem.cpp
type tracy (line 57) | namespace tracy
type detail (line 60) | namespace detail
function TRACY_API (line 63) | TRACY_API uint32_t GetThreadHandleImpl()
type THREADNAME_INFO (line 111) | struct THREADNAME_INFO
function ThreadNameMsvcMagic (line 120) | void ThreadNameMsvcMagic( const THREADNAME_INFO& info )
function TRACY_API (line 132) | TRACY_API void SetThreadName( const char* name )
function TRACY_API (line 137) | TRACY_API void SetThreadNameWithHint( const char* name, int32_t groupH...
function ThreadNameData (line 218) | ThreadNameData* GetThreadNameData( uint32_t id )
function TRACY_API (line 233) | TRACY_API const char* GetThreadName( uint32_t id )
function TRACY_API (line 307) | TRACY_API const char* GetEnvVar( const char* name )
function TRACY_API (line 345) | TRACY_API void ___tracy_set_thread_name( const char* name ) { tracy::Set...
FILE: tracy-client-sys/tracy/common/TracySystem.hpp
type tracy (line 8) | namespace tracy
type detail (line 11) | namespace detail
type ThreadNameData (line 17) | struct ThreadNameData
function GetThreadHandle (line 29) | static inline uint32_t GetThreadHandle()
FILE: tracy-client-sys/tracy/common/TracyVersion.hpp
type tracy (line 4) | namespace tracy
type Version (line 6) | namespace Version
FILE: tracy-client-sys/tracy/common/TracyYield.hpp
type tracy (line 12) | namespace tracy
function tracy_force_inline (line 15) | static tracy_force_inline void YieldThread()
FILE: tracy-client-sys/tracy/common/tracy_lz4.cpp
function LZ4_isAligned (line 290) | static int LZ4_isAligned(const void* ptr, size_t alignment)
function LZ4_isLittleEndian (line 363) | static unsigned LZ4_isLittleEndian(void)
function U16 (line 373) | static U16 LZ4_read16(const void* memPtr) { return *(const U16*) memPtr; }
function U32 (line 374) | static U32 LZ4_read32(const void* memPtr) { return *(const U32*) memPtr; }
function reg_t (line 375) | static reg_t LZ4_read_ARCH(const void* memPtr) { return *(const reg_t*) ...
function LZ4_write16 (line 377) | static void LZ4_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; }
function LZ4_write32 (line 378) | static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; }
function U16 (line 386) | static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign*)ptr...
function U32 (line 387) | static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign*)ptr...
function reg_t (line 388) | static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalign...
function LZ4_write16 (line 390) | static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign*)memPtr...
function LZ4_write32 (line 391) | static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign*)memPtr...
function U16 (line 395) | static U16 LZ4_read16(const void* memPtr)
function U32 (line 400) | static U32 LZ4_read32(const void* memPtr)
function reg_t (line 405) | static reg_t LZ4_read_ARCH(const void* memPtr)
function LZ4_write16 (line 410) | static void LZ4_write16(void* memPtr, U16 value)
function LZ4_write32 (line 415) | static void LZ4_write32(void* memPtr, U32 value)
function U16 (line 423) | static U16 LZ4_readLE16(const void* memPtr)
function LZ4_writeLE16 (line 433) | static void LZ4_writeLE16(void* memPtr, U16 value)
function LZ4_FORCE_INLINE (line 445) | LZ4_FORCE_INLINE
function LZ4_FORCE_INLINE (line 476) | LZ4_FORCE_INLINE void
function LZ4_FORCE_INLINE (line 502) | LZ4_FORCE_INLINE void
function LZ4_FORCE_INLINE (line 515) | LZ4_FORCE_INLINE void
function LZ4_NbCommonBytes (line 560) | LZ4_FORCE_INLINE unsigned LZ4_NbCommonBytes (reg_t val)
function LZ4_count (line 660) | LZ4_FORCE_INLINE
function LZ4_versionNumber (line 730) | int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; }
function LZ4_compressBound (line 732) | int LZ4_compressBound(int isize) { return LZ4_COMPRESSBOUND(isize); }
function LZ4_sizeofState (line 733) | int LZ4_sizeofState(void) { return sizeof(LZ4_stream_t); }
function LZ4_FORCE_INLINE (line 752) | LZ4_FORCE_INLINE U32 LZ4_hash4(U32 sequence, tableType_t const tableType)
function LZ4_FORCE_INLINE (line 760) | LZ4_FORCE_INLINE U32 LZ4_hash5(U64 sequence, tableType_t const tableType)
function LZ4_FORCE_INLINE (line 772) | LZ4_FORCE_INLINE U32 LZ4_hashPosition(const void* const p, tableType_t c...
function LZ4_FORCE_INLINE (line 778) | LZ4_FORCE_INLINE void LZ4_clearHash(U32 h, void* tableBase, tableType_t ...
function LZ4_FORCE_INLINE (line 790) | LZ4_FORCE_INLINE void LZ4_putIndexOnHash(U32 idx, U32 h, void* tableBase...
function LZ4_FORCE_INLINE (line 802) | LZ4_FORCE_INLINE void LZ4_putPositionOnHash(const BYTE* p, U32 h,
function LZ4_FORCE_INLINE (line 815) | LZ4_FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, ta...
function LZ4_FORCE_INLINE (line 827) | LZ4_FORCE_INLINE U32 LZ4_getIndexOnHash(U32 h, const void* tableBase, ta...
function BYTE (line 843) | static const BYTE* LZ4_getPositionOnHash(U32 h, const void* tableBase, t...
function LZ4_FORCE_INLINE (line 850) | LZ4_FORCE_INLINE const BYTE*
function LZ4_FORCE_INLINE (line 859) | LZ4_FORCE_INLINE void
function LZ4_FORCE_INLINE (line 906) | LZ4_FORCE_INLINE int LZ4_compress_generic_validated(
function LZ4_FORCE_INLINE (line 1304) | LZ4_FORCE_INLINE int LZ4_compress_generic(
function LZ4_compress_fast_extState (line 1342) | int LZ4_compress_fast_extState(void* state, const char* source, char* de...
function LZ4_compress_fast_extState_fastReset (line 1374) | int LZ4_compress_fast_extState_fastReset(void* state, const char* src, c...
function LZ4_compress_fast (line 1412) | int LZ4_compress_fast(const char* source, char* dest, int inputSize, int...
function LZ4_compress_default (line 1431) | int LZ4_compress_default(const char* src, char* dst, int srcSize, int ma...
function LZ4_compress_destSize_extState (line 1440) | static int LZ4_compress_destSize_extState (LZ4_stream_t* state, const ch...
function LZ4_compress_destSize (line 1457) | int LZ4_compress_destSize(const char* src, char* dst, int* srcSizePtr, i...
function LZ4_stream_t (line 1482) | LZ4_stream_t* LZ4_createStream(void)
function LZ4_stream_t_alignment (line 1493) | static size_t LZ4_stream_t_alignment(void)
function LZ4_stream_t (line 1503) | LZ4_stream_t* LZ4_initStream (void* buffer, size_t size)
function LZ4_resetStream (line 1515) | void LZ4_resetStream (LZ4_stream_t* LZ4_stream)
function LZ4_resetStream_fast (line 1521) | void LZ4_resetStream_fast(LZ4_stream_t* ctx) {
function LZ4_freeStream (line 1526) | int LZ4_freeStream (LZ4_stream_t* LZ4_stream)
function LZ4_loadDict (line 1537) | int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int di...
function LZ4_attach_dictionary (line 1579) | void LZ4_attach_dictionary(LZ4_stream_t* workingStream, const LZ4_stream...
function LZ4_renormDictT (line 1608) | static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, int nextSize)
function LZ4_compress_fast_continue (line 1628) | int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream,
function LZ4_compress_forceExtDict (line 1708) | int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* sourc...
function LZ4_saveDict (line 1735) | int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
function read_long_length_no_check (line 1773) | size_t read_long_length_no_check(const BYTE** pp)
function LZ4_FORCE_INLINE (line 1790) | LZ4_FORCE_INLINE int
function LZ4_FORCE_INLINE (line 1899) | LZ4_FORCE_INLINE Rvl_t
function LZ4_FORCE_O2 (line 2340) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2348) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2357) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2368) | LZ4_FORCE_O2 /* Exported, an obsolete API function. */
function LZ4_FORCE_O2 (line 2376) | LZ4_FORCE_O2
function LZ4_decompress_fast_withPrefix64k (line 2386) | int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, in...
function LZ4_FORCE_O2 (line 2393) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2402) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2412) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2422) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2433) | LZ4_FORCE_O2
function LZ4_FORCE_INLINE (line 2446) | LZ4_FORCE_INLINE
function LZ4_streamDecode_t (line 2458) | LZ4_streamDecode_t* LZ4_createStreamDecode(void)
function LZ4_freeStreamDecode (line 2464) | int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream)
function LZ4_setStreamDecode (line 2478) | int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const cha...
function LZ4_decoderRingBufferSize (line 2504) | int LZ4_decoderRingBufferSize(int maxBlockSize)
function LZ4_FORCE_O2 (line 2519) | LZ4_FORCE_O2
function LZ4_FORCE_O2 (line 2559) | LZ4_FORCE_O2 int
function LZ4_decompress_safe_usingDict (line 2608) | int LZ4_decompress_safe_usingDict(const char* source, char* dest, int co...
function LZ4_decompress_safe_partial_usingDict (line 2623) | int LZ4_decompress_safe_partial_usingDict(const char* source, char* dest...
function LZ4_decompress_fast_usingDict (line 2638) | int LZ4_decompress_fast_usingDict(const char* source, char* dest, int or...
function LZ4_compress_limitedOutput (line 2653) | int LZ4_compress_limitedOutput(const char* source, char* dest, int input...
function LZ4_compress (line 2657) | int LZ4_compress(const char* src, char* dest, int srcSize)
function LZ4_compress_limitedOutput_withState (line 2661) | int LZ4_compress_limitedOutput_withState (void* state, const char* src, ...
function LZ4_compress_withState (line 2665) | int LZ4_compress_withState (void* state, const char* src, char* dst, int...
function LZ4_compress_limitedOutput_continue (line 2669) | int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_stream, const...
function LZ4_compress_continue (line 2673) | int LZ4_compress_continue (LZ4_stream_t* LZ4_stream, const char* source,...
function LZ4_uncompress (line 2684) | int LZ4_uncompress (const char* source, char* dest, int outputSize)
function LZ4_uncompress_unknownOutputSize (line 2688) | int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, in...
function LZ4_sizeofStreamState (line 2695) | int LZ4_sizeofStreamState(void) { return sizeof(LZ4_stream_t); }
function LZ4_resetStreamState (line 2697) | int LZ4_resetStreamState(void* state, char* inputBuffer)
FILE: tracy-client-sys/tracy/common/tracy_lz4.hpp
type tracy (line 140) | namespace tracy
type LZ4_stream_t_internal (line 686) | struct LZ4_stream_t_internal
type LZ4_stream_t_internal (line 687) | struct LZ4_stream_t_internal {
type tracy (line 537) | namespace tracy
type LZ4_stream_t_internal (line 686) | struct LZ4_stream_t_internal
type LZ4_stream_t_internal (line 687) | struct LZ4_stream_t_internal {
type tracy (line 654) | namespace tracy
type LZ4_stream_t_internal (line 686) | struct LZ4_stream_t_internal
type LZ4_stream_t_internal (line 687) | struct LZ4_stream_t_internal {
FILE: tracy-client-sys/tracy/common/tracy_lz4hc.cpp
type tracy (line 88) | namespace tracy
function U32 (line 91) | static U32 LZ4HC_hashPtr(const void* ptr) { return HASH_FUNCTION(LZ4_r...
function LZ4HC_clearTables (line 97) | static void LZ4HC_clearTables (LZ4HC_CCtx_internal* hc4)
function LZ4HC_init_internal (line 103) | static void LZ4HC_init_internal (LZ4HC_CCtx_internal* hc4, const BYTE*...
function LZ4_FORCE_INLINE (line 123) | LZ4_FORCE_INLINE void LZ4HC_Insert (LZ4HC_CCtx_internal* hc4, const BY...
function LZ4_FORCE_INLINE (line 148) | LZ4_FORCE_INLINE
function U32 (line 170) | static U32 LZ4HC_rotatePattern(size_t const rotate, U32 const pattern)
function LZ4HC_countPattern (line 179) | static unsigned
function LZ4HC_reverseCountPattern (line 212) | static unsigned
function LZ4HC_protectDictEnd (line 234) | static int LZ4HC_protectDictEnd(U32 const dictLimit, U32 const matchIn...
function LZ4_FORCE_INLINE (line 242) | LZ4_FORCE_INLINE int
function LZ4_FORCE_INLINE (line 452) | LZ4_FORCE_INLINE int
function LZ4_FORCE_INLINE (line 470) | LZ4_FORCE_INLINE int LZ4HC_encodeSequence (
function LZ4_FORCE_INLINE (line 556) | LZ4_FORCE_INLINE int LZ4HC_compress_hashChain (
function LZ4_FORCE_INLINE (line 803) | LZ4_FORCE_INLINE int LZ4HC_compress_generic_internal (
function LZ4HC_compress_generic_noDictCtx (line 868) | static int
function LZ4HC_compress_generic_dictCtx (line 883) | static int
function LZ4HC_compress_generic (line 909) | static int
function LZ4_sizeofStateHC (line 928) | int LZ4_sizeofStateHC(void) { return (int)sizeof(LZ4_streamHC_t); }
function LZ4_streamHC_t_alignment (line 930) | static size_t LZ4_streamHC_t_alignment(void)
function LZ4_compress_HC_extStateHC_fastReset (line 942) | int LZ4_compress_HC_extStateHC_fastReset (void* state, const char* src...
function LZ4_compress_HC_extStateHC (line 954) | int LZ4_compress_HC_extStateHC (void* state, const char* src, char* ds...
function LZ4_compress_HC (line 961) | int LZ4_compress_HC(const char* src, char* dst, int srcSize, int dstCa...
function LZ4_compress_HC_destSize (line 979) | int LZ4_compress_HC_destSize(void* state, const char* source, char* de...
function LZ4_streamHC_t (line 995) | LZ4_streamHC_t* LZ4_createStreamHC(void)
function LZ4_freeStreamHC (line 1004) | int LZ4_freeStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr)
function LZ4_streamHC_t (line 1014) | LZ4_streamHC_t* LZ4_initStreamHC (void* buffer, size_t size)
function LZ4_resetStreamHC (line 1030) | void LZ4_resetStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr, int compressi...
function LZ4_resetStreamHC_fast (line 1036) | void LZ4_resetStreamHC_fast (LZ4_streamHC_t* LZ4_streamHCPtr, int comp...
function LZ4_setCompressionLevel (line 1054) | void LZ4_setCompressionLevel(LZ4_streamHC_t* LZ4_streamHCPtr, int comp...
function LZ4_favorDecompressionSpeed (line 1062) | void LZ4_favorDecompressionSpeed(LZ4_streamHC_t* LZ4_streamHCPtr, int ...
function LZ4_loadDictHC (line 1069) | int LZ4_loadDictHC (LZ4_streamHC_t* LZ4_streamHCPtr,
function LZ4_attach_HC_dictionary (line 1090) | void LZ4_attach_HC_dictionary(LZ4_streamHC_t *working_stream, const LZ...
function LZ4HC_setExternalDict (line 1096) | static void LZ4HC_setExternalDict(LZ4HC_CCtx_internal* ctxPtr, const B...
function LZ4_compressHC_continue_generic (line 1114) | static int
function LZ4_compress_HC_continue (line 1154) | int LZ4_compress_HC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const c...
function LZ4_compress_HC_continue_destSize (line 1162) | int LZ4_compress_HC_continue_destSize (LZ4_streamHC_t* LZ4_streamHCPtr...
function LZ4_saveDictHC (line 1174) | int LZ4_saveDictHC (LZ4_streamHC_t* LZ4_streamHCPtr, char* safeBuffer,...
function LZ4_compressHC (line 1206) | int LZ4_compressHC(const char* src, char* dst, int srcSize) { return L...
function LZ4_compressHC_limitedOutput (line 1207) | int LZ4_compressHC_limitedOutput(const char* src, char* dst, int srcSi...
function LZ4_compressHC2 (line 1208) | int LZ4_compressHC2(const char* src, char* dst, int srcSize, int cLeve...
function LZ4_compressHC2_limitedOutput (line 1209) | int LZ4_compressHC2_limitedOutput(const char* src, char* dst, int srcS...
function LZ4_compressHC_withStateHC (line 1210) | int LZ4_compressHC_withStateHC (void* state, const char* src, char* ds...
function LZ4_compressHC_limitedOutput_withStateHC (line 1211) | int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char*...
function LZ4_compressHC2_withStateHC (line 1212) | int LZ4_compressHC2_withStateHC (void* state, const char* src, char* d...
function LZ4_compressHC2_limitedOutput_withStateHC (line 1213) | int LZ4_compressHC2_limitedOutput_withStateHC (void* state, const char...
function LZ4_compressHC_continue (line 1214) | int LZ4_compressHC_continue (LZ4_streamHC_t* ctx, const char* src, cha...
function LZ4_compressHC_limitedOutput_continue (line 1215) | int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* ctx, const ...
function LZ4_sizeofStreamStateHC (line 1219) | int LZ4_sizeofStreamStateHC(void) { return sizeof(LZ4_streamHC_t); }
function LZ4_resetStreamStateHC (line 1223) | int LZ4_resetStreamStateHC(void* state, char* inputBuffer)
function LZ4_freeHC (line 1240) | int LZ4_freeHC (void* LZ4HC_Data)
function LZ4_compressHC2_continue (line 1248) | int LZ4_compressHC2_continue (void* LZ4HC_Data, const char* src, char*...
function LZ4_compressHC2_limitedOutput_continue (line 1253) | int LZ4_compressHC2_limitedOutput_continue (void* LZ4HC_Data, const ch...
function LZ4_FORCE_INLINE (line 1279) | LZ4_FORCE_INLINE int LZ4HC_literalsPrice(int const litlen)
function LZ4_FORCE_INLINE (line 1290) | LZ4_FORCE_INLINE int LZ4HC_sequencePrice(int litlen, int mlen)
function LZ4_FORCE_INLINE (line 1310) | LZ4_FORCE_INLINE LZ4HC_match_t
function LZ4HC_compress_optimal (line 1333) | static int LZ4HC_compress_optimal ( LZ4HC_CCtx_internal* ctx,
FILE: tracy-client-sys/tracy/common/tracy_lz4hc.hpp
type tracy (line 48) | namespace tracy
type LZ4HC_CCtx_internal (line 202) | struct LZ4HC_CCtx_internal
type LZ4HC_CCtx_internal (line 203) | struct LZ4HC_CCtx_internal
type tracy (line 312) | namespace tracy
type LZ4HC_CCtx_internal (line 202) | struct LZ4HC_CCtx_internal
type LZ4HC_CCtx_internal (line 203) | struct LZ4HC_CCtx_internal
FILE: tracy-client-sys/tracy/libbacktrace/alloc.cpp
type tracy (line 44) | namespace tracy
type backtrace_state (line 56) | struct backtrace_state
function backtrace_free (line 73) | void
type backtrace_state (line 85) | struct backtrace_state
type backtrace_vector (line 87) | struct backtrace_vector
type backtrace_state (line 126) | struct backtrace_state
type backtrace_vector (line 127) | struct backtrace_vector
function backtrace_vector_release (line 147) | int
FILE: tracy-client-sys/tracy/libbacktrace/backtrace.hpp
type tracy (line 40) | namespace tracy
type backtrace_state (line 46) | struct backtrace_state
type backtrace_state (line 86) | struct backtrace_state
type backtrace_state (line 113) | struct backtrace_state
type backtrace_state (line 132) | struct backtrace_state
type backtrace_state (line 142) | struct backtrace_state
type backtrace_state (line 153) | struct backtrace_state
type backtrace_state (line 179) | struct backtrace_state
FILE: tracy-client-sys/tracy/libbacktrace/dwarf.cpp
type tracy (line 45) | namespace tracy
type dwarf_tag (line 50) | enum dwarf_tag {
type dwarf_form (line 58) | enum dwarf_form {
type dwarf_attribute (line 108) | enum dwarf_attribute {
type dwarf_line_number_op (line 328) | enum dwarf_line_number_op {
type dwarf_extended_line_number_op (line 344) | enum dwarf_extended_line_number_op {
type dwarf_line_number_content_type (line 351) | enum dwarf_line_number_content_type {
type dwarf_range_list_entry (line 361) | enum dwarf_range_list_entry {
type dwarf_unit_type (line 372) | enum dwarf_unit_type {
function xstrnlen (line 387) | static size_t
type dwarf_buf (line 404) | struct dwarf_buf
type attr (line 426) | struct attr
type dwarf_attribute (line 429) | enum dwarf_attribute
type dwarf_form (line 431) | enum dwarf_form
type abbrev (line 438) | struct abbrev
type dwarf_tag (line 443) | enum dwarf_tag
type attr (line 449) | struct attr
type abbrevs (line 459) | struct abbrevs
type abbrev (line 464) | struct abbrev
type attr_val_encoding (line 469) | enum attr_val_encoding
type attr_val (line 506) | struct attr_val
type attr_val_encoding (line 509) | enum attr_val_encoding
type line_header (line 524) | struct line_header
type line_header_format (line 554) | struct line_header_format
type dwarf_form (line 557) | enum dwarf_form
type line (line 565) | struct line
type line_vector (line 583) | struct line_vector
type backtrace_vector (line 586) | struct backtrace_vector
type function (line 593) | struct function
type function_addrs (line 604) | struct function_addrs
type function_addrs (line 611) | struct function_addrs
type function (line 617) | struct function
type function_vector (line 622) | struct function_vector
type backtrace_vector (line 625) | struct backtrace_vector
type unit (line 633) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type unit_addrs (line 693) | struct unit_addrs
type unit (line 699) | struct unit
type unit_addrs_vector (line 704) | struct unit_addrs_vector
type backtrace_vector (line 707) | struct backtrace_vector
type unit_vector (line 714) | struct unit_vector
type backtrace_vector (line 716) | struct backtrace_vector
type dwarf_data (line 722) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
function dwarf_buf_error (line 749) | static void
function require (line 762) | static int
function advance (line 780) | static int
type dwarf_buf (line 793) | struct dwarf_buf
function read_byte (line 811) | static unsigned char
function read_sbyte (line 823) | static signed char
function read_uint16 (line 835) | static uint16_t
function read_uint24 (line 850) | static uint32_t
function read_uint32 (line 867) | static uint32_t
function read_uint64 (line 884) | static uint64_t
function read_offset (line 906) | static uint64_t
function read_address (line 918) | static uint64_t
function is_highest_address (line 940) | static int
function read_uleb128 (line 960) | static uint64_t
function read_sleb128 (line 995) | static int64_t
function leb128_len (line 1033) | static size_t
function read_initial_length (line 1049) | static uint64_t
function free_abbrevs (line 1068) | static void
function read_attribute (line 1090) | static int
function resolve_string (line 1374) | static int
function resolve_addr_index (line 1429) | static int
function units_search (line 1461) | static int
type unit (line 1479) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type unit (line 1480) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type unit (line 1482) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type unit (line 1483) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type unit (line 1483) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
function function_addrs_compare (line 1490) | static int
function function_addrs_search (line 1513) | static int
function add_unit_addr (line 1532) | static int
function unit_addrs_compare (line 1573) | static int
function unit_addrs_search (line 1600) | static int
function line_compare (line 1621) | static int
function line_search (line 1644) | static int
function abbrev_compare (line 1663) | static int
function read_abbrevs (line 1685) | static int
type abbrev (line 1837) | struct abbrev
type dwarf_tag (line 443) | enum dwarf_tag
type attr (line 449) | struct attr
type abbrevs (line 1838) | struct abbrevs
type abbrev (line 464) | struct abbrev
type abbrev (line 1841) | struct abbrev
type dwarf_tag (line 443) | enum dwarf_tag
type attr (line 449) | struct attr
type abbrev (line 1854) | struct abbrev
type dwarf_tag (line 443) | enum dwarf_tag
type attr (line 449) | struct attr
type abbrev (line 1860) | struct abbrev
type dwarf_tag (line 443) | enum dwarf_tag
type attr (line 449) | struct attr
type pcrange (line 1869) | struct pcrange {
function update_pcrange (line 1884) | static void
function add_low_high_range (line 1947) | static int
function add_ranges_from_ranges (line 1996) | static int
function add_ranges_from_rnglists (line 2064) | static int
function add_ranges (line 2244) | static int
function find_address_ranges (line 2282) | static int
function build_address_map (line 2438) | static int
function add_line (line 2634) | static int
function free_line_header (line 2672) | static void
function read_v2_paths (line 2687) | static int
function read_lnct (line 2820) | static int
function read_line_header_format_entries (line 2906) | static int
function read_line_header (line 2989) | static int
function read_line_program (line 3071) | static int
function read_line_info (line 3273) | static int
type dwarf_data (line 3356) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
type unit (line 3356) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type dwarf_data (line 3363) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
type unit (line 3363) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type attr (line 3364) | struct attr
type dwarf_attribute (line 429) | enum dwarf_attribute
type dwarf_form (line 431) | enum dwarf_form
type attr_val (line 3364) | struct attr_val
type attr_val_encoding (line 509) | enum attr_val_encoding
type unit (line 3382) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type unit (line 3398) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type dwarf_data (line 3417) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
type unit (line 3417) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type dwarf_buf (line 3421) | struct dwarf_buf
type abbrev (line 3423) | struct abbrev
type dwarf_tag (line 443) | enum dwarf_tag
type attr (line 449) | struct attr
type attr_val (line 3467) | struct attr_val
type attr_val_encoding (line 509) | enum attr_val_encoding
function add_function_range (line 3528) | static int
function read_function_entry (line 3568) | static int
function read_function_info (line 3821) | static void
function report_inlined_functions (line 3907) | static int
function dwarf_lookup_pc (line 3994) | static int
function dwarf_fileline_dwarf_lookup_pc_in_all_entries (line 4261) | bool dwarf_fileline_dwarf_lookup_pc_in_all_entries(struct backtrace_st...
function dwarf_fileline (line 4278) | static int
type dwarf_data (line 4337) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
type backtrace_state (line 4338) | struct backtrace_state
type libbacktrace_base_address (line 4339) | struct libbacktrace_base_address
type dwarf_sections (line 4340) | struct dwarf_sections
type dwarf_data (line 4342) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
type unit_addrs_vector (line 4346) | struct unit_addrs_vector
type backtrace_vector (line 707) | struct backtrace_vector
type unit_addrs (line 4347) | struct unit_addrs
type unit (line 699) | struct unit
type unit_vector (line 4349) | struct unit_vector
type backtrace_vector (line 716) | struct backtrace_vector
type unit (line 4350) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type dwarf_data (line 4352) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
type unit_addrs (line 4363) | struct unit_addrs
type unit (line 699) | struct unit
type unit (line 4364) | struct unit
type abbrevs (line 669) | struct abbrevs
type line (line 679) | struct line
type function_addrs (line 683) | struct function_addrs
type unit_addrs (line 4367) | struct unit_addrs
type unit (line 699) | struct unit
type dwarf_data (line 4371) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
type dwarf_data (line 4372) | struct dwarf_data
type dwarf_data (line 725) | struct dwarf_data
type dwarf_data (line 727) | struct dwarf_data
type libbacktrace_base_address (line 729) | struct libbacktrace_base_address
type unit_addrs (line 731) | struct unit_addrs
type unit (line 735) | struct unit
type dwarf_sections (line 739) | struct dwarf_sections
type function_vector (line 744) | struct function_vector
function backtrace_dwarf_add (line 4395) | int
FILE: tracy-client-sys/tracy/libbacktrace/elf.cpp
type tracy (line 74) | namespace tracy
function xstrnlen (line 85) | static size_t
function xlstat (line 104) | static int
function xreadlink (line 118) | static ssize_t
type dl_phdr_info (line 136) | struct dl_phdr_info
function dl_iterate_phdr (line 142) | static int
type debug_section_info (line 374) | struct debug_section_info
type elf_symbol (line 388) | struct elf_symbol
type elf_syminfo_data (line 400) | struct elf_syminfo_data
type elf_syminfo_data (line 403) | struct elf_syminfo_data
type elf_symbol (line 405) | struct elf_symbol
type elf_view (line 412) | struct elf_view
type backtrace_view (line 414) | struct backtrace_view
type elf_ppc64_opd_data (line 420) | struct elf_ppc64_opd_data
type elf_view (line 429) | struct elf_view
function elf_get_view (line 434) | static int
function elf_release_view (line 463) | static void
function elf_crc32 (line 474) | static uint32_t
function elf_crc32_file (line 542) | static uint32_t
function elf_nosyms (line 570) | static void
function elf_nodebug (line 581) | static int
function elf_symbol_compare (line 608) | static int
function elf_symbol_search (line 626) | static int
function elf_initialize_syminfo (line 644) | static int
function elf_add_syminfo_data (line 730) | static void
function elf_syminfo (line 772) | static void
function elf_is_symlink (line 823) | static int
type backtrace_state (line 838) | struct backtrace_state
function elf_open_debugfile_by_buildid (line 878) | static int
function elf_try_debugfile (line 942) | static int
function elf_find_debugfile_by_debuglink (line 975) | static int
function elf_open_debugfile_by_debuglink (line 1091) | static int
function elf_uncompress_failed (line 1125) | static void
function elf_fetch_bits (line 1136) | static int
function elf_fetch_bits_backward (line 1187) | static int
function elf_fetch_backward_init (line 1242) | static int
function elf_zlib_inflate_table (line 1363) | static int
function main (line 1683) | int
function elf_zlib_inflate (line 1836) | static int
function elf_zlib_verify_checksum (line 2537) | static int
function elf_zlib_inflate_and_verify (line 2663) | static int
type elf_zstd_fse_entry (line 2709) | struct elf_zstd_fse_entry
type elf_zstd_fse_entry (line 2721) | struct elf_zstd_fse_entry
function elf_zstd_read_fse (line 2731) | static int
function elf_zstd_build_fse (line 2917) | static int
type elf_zstd_fse_baseline_entry (line 3071) | struct elf_zstd_fse_baseline_entry
function elf_zstd_make_literal_baseline_fse (line 3086) | static int
function elf_zstd_make_offset_baseline_fse (line 3142) | static int
function elf_zstd_make_match_baseline_fse (line 3205) | static int
function print_table (line 3289) | static void
function main (line 3309) | int
type elf_zstd_fse_baseline_entry (line 3384) | struct elf_zstd_fse_baseline_entry
type elf_zstd_fse_baseline_entry (line 3410) | struct elf_zstd_fse_baseline_entry
type elf_zstd_fse_baseline_entry (line 3436) | struct elf_zstd_fse_baseline_entry
function elf_zstd_read_huff (line 3457) | static int
function elf_zstd_read_literals (line 3748) | static int
type elf_zstd_seq_decode (line 4271) | struct elf_zstd_seq_decode
type elf_zstd_fse_baseline_entry (line 4273) | struct elf_zstd_fse_baseline_entry
function elf_zstd_unpack_seq_decode (line 4279) | static int
function elf_zstd_decompress (line 4356) | static int
function elf_uncompress_zdebug (line 5031) | static int
function elf_uncompress_chdr (line 5084) | static int
function backtrace_uncompress_zdebug (line 5157) | int
function backtrace_uncompress_zstd (line 5183) | int
function elf_lzma_varint (line 5373) | static int
function elf_lzma_range_normalize (line 5413) | static void
function elf_lzma_bit (line 5436) | static int
function elf_lzma_integer (line 5464) | static uint32_t
function elf_lzma_reverse_integer (line 5488) | static uint32_t
function elf_lzma_len (line 5516) | static uint32_t
function elf_uncompress_lzma_block (line 5573) | static int
function elf_uncompress_lzma (line 6268) | static int
function backtrace_uncompress_lzma (line 6499) | int
function elf_add (line 6518) | static int
type phdr_data (line 7346) | struct phdr_data
type backtrace_state (line 7348) | struct backtrace_state
type PhdrIterate (line 7361) | struct PhdrIterate
type ElfAddrRange (line 7369) | struct ElfAddrRange
function address_in_known_elf_ranges (line 7376) | static int address_in_known_elf_ranges(uintptr_t pc)
function phdr_callback_mock (line 7387) | static int
function phdr_callback (line 7418) | phdr_callback (struct PhdrIterate *info, void *pdata)
function elf_iterate_phdr_and_add_new_files (line 7469) | static int elf_iterate_phdr_and_add_new_files(phdr_data *pd)
function elf_refresh_address_ranges_if_needed (line 7505) | static int elf_refresh_address_ranges_if_needed(struct backtrace_state...
function backtrace_initialize (line 7533) | int
FILE: tracy-client-sys/tracy/libbacktrace/fileline.cpp
type tracy (line 69) | namespace tracy
type backtrace_state (line 80) | struct backtrace_state
type backtrace_state (line 111) | struct backtrace_state
type backtrace_state (line 128) | struct backtrace_state
type backtrace_state (line 147) | struct backtrace_state
function fileline_initialize (line 217) | static int
function backtrace_pcinfo (line 354) | int
function backtrace_syminfo (line 370) | int
function backtrace_syminfo_to_full_callback (line 389) | void
function backtrace_syminfo_to_full_error_callback (line 403) | void
FILE: tracy-client-sys/tracy/libbacktrace/internal.hpp
type tracy (line 119) | namespace tracy
type backtrace_state (line 125) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_state (line 132) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_state (line 138) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_state (line 143) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_view (line 187) | struct backtrace_view
type backtrace_state (line 199) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_view (line 202) | struct backtrace_view
type backtrace_state (line 205) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_view (line 206) | struct backtrace_view
type backtrace_state (line 225) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_state (line 232) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_vector (line 241) | struct backtrace_vector
type backtrace_state (line 255) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_vector (line 258) | struct backtrace_vector
type backtrace_state (line 265) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_vector (line 266) | struct backtrace_vector
type backtrace_state (line 273) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_vector (line 274) | struct backtrace_vector
function backtrace_vector_free (line 280) | static inline void
type backtrace_state (line 300) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type dwarf_section (line 309) | enum dwarf_section
type dwarf_sections (line 326) | struct dwarf_sections
type dwarf_data (line 334) | struct dwarf_data
type libbacktrace_base_address (line 349) | struct libbacktrace_base_address
type elf32_fdpic_loadaddr (line 351) | struct elf32_fdpic_loadaddr
type libbacktrace_base_address (line 361) | struct libbacktrace_base_address
type elf32_fdpic_loadaddr (line 351) | struct elf32_fdpic_loadaddr
type backtrace_state (line 372) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type libbacktrace_base_address (line 373) | struct libbacktrace_base_address
type elf32_fdpic_loadaddr (line 351) | struct elf32_fdpic_loadaddr
type dwarf_sections (line 374) | struct dwarf_sections
type dwarf_data (line 376) | struct dwarf_data
type dwarf_data (line 379) | struct dwarf_data
type backtrace_call_full (line 383) | struct backtrace_call_full
type backtrace_state (line 408) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_state (line 417) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
type backtrace_state (line 426) | struct backtrace_state
type backtrace_freelist_struct (line 166) | struct backtrace_freelist_struct
FILE: tracy-client-sys/tracy/libbacktrace/macho.cpp
type tracy (line 47) | namespace tracy
type macho_header_32 (line 52) | struct macho_header_32
type macho_header_64 (line 65) | struct macho_header_64
type macho_header_fat (line 79) | struct macho_header_fat
type macho_fat_arch (line 104) | struct macho_fat_arch
type macho_fat_arch_64 (line 117) | struct macho_fat_arch_64
type macho_load_command (line 142) | struct macho_load_command
type macho_segment_command (line 161) | struct macho_segment_command
type macho_segment_64_command (line 178) | struct macho_segment_64_command
type macho_symtab_command (line 195) | struct macho_symtab_command
type macho_uuid_command (line 211) | struct macho_uuid_command
type macho_section (line 220) | struct macho_section
type macho_section_64 (line 237) | struct macho_section_64
type macho_nlist (line 255) | struct macho_nlist
type macho_nlist_64 (line 266) | struct macho_nlist_64
type macho_symbol (line 288) | struct macho_symbol
type macho_syminfo_data (line 296) | struct macho_syminfo_data
type macho_syminfo_data (line 298) | struct macho_syminfo_data
type macho_symbol (line 299) | struct macho_symbol
type backtrace_state (line 320) | struct backtrace_state
type libbacktrace_base_address (line 321) | struct libbacktrace_base_address
function macho_nodebug (line 327) | static int
function macho_nosyms (line 340) | static void
function macho_add_dwarf_section (line 352) | static int
function macho_add_dwarf_segment (line 385) | static int
function macho_symbol_compare (line 453) | static int
function macho_symbol_search (line 471) | static int
function macho_defined_symbol (line 496) | static int
function macho_add_symtab (line 516) | static int
function macho_syminfo (line 710) | static void
function macho_add_fat (line 763) | static int
function macho_add_dsym (line 867) | static int
function macho_add (line 985) | static int
function backtrace_initialize (line 1232) | int
function backtrace_initialize (line 1323) | int
FILE: tracy-client-sys/tracy/libbacktrace/mmapio.cpp
type tracy (line 51) | namespace tracy
function backtrace_get_view (line 59) | int
function backtrace_release_view (line 99) | void
FILE: tracy-client-sys/tracy/libbacktrace/posix.cpp
type tracy (line 56) | namespace tracy
function backtrace_open (line 61) | int
function backtrace_close (line 97) | int
FILE: tracy-client-sys/tracy/libbacktrace/sort.cpp
type tracy (line 41) | namespace tracy
function swap (line 48) | static void
function backtrace_qsort (line 63) | void
FILE: tracy-client-sys/tracy/libbacktrace/state.cpp
type tracy (line 41) | namespace tracy
type backtrace_state (line 47) | struct backtrace_state
type backtrace_state (line 52) | struct backtrace_state
type backtrace_state (line 53) | struct backtrace_state
type backtrace_state (line 67) | struct backtrace_state
FILE: tracy-client-sys/tracy/tracy/TracyC.h
type TracyPlotFormatEnum (line 13) | enum TracyPlotFormatEnum
type ___tracy_source_location_data (line 134) | struct ___tracy_source_location_data
type ___tracy_c_zone_context (line 143) | struct ___tracy_c_zone_context
type ___tracy_gpu_time_data (line 149) | struct ___tracy_gpu_time_data
type ___tracy_gpu_zone_begin_data (line 156) | struct ___tracy_gpu_zone_begin_data {
type ___tracy_gpu_zone_begin_callstack_data (line 162) | struct ___tracy_gpu_zone_begin_callstack_data {
type ___tracy_gpu_zone_end_data (line 169) | struct ___tracy_gpu_zone_end_data {
type ___tracy_gpu_new_context_data (line 174) | struct ___tracy_gpu_new_context_data {
type ___tracy_gpu_context_name_data (line 182) | struct ___tracy_gpu_context_name_data {
type ___tracy_gpu_calibration_data (line 188) | struct ___tracy_gpu_calibration_data {
type ___tracy_gpu_time_sync_data (line 194) | struct ___tracy_gpu_time_sync_data {
type __tracy_lockable_context_data (line 199) | struct __tracy_lockable_context_data
type TracyCZoneCtx (line 203) | typedef /*const*/ struct ___tracy_c_zone_context TracyCZoneCtx;
type __tracy_lockable_context_data (line 205) | struct __tracy_lockable_context_data
type ___tracy_source_location_data (line 220) | struct ___tracy_source_location_data
type ___tracy_source_location_data (line 221) | struct ___tracy_source_location_data
type ___tracy_gpu_zone_begin_data (line 230) | struct ___tracy_gpu_zone_begin_data
type ___tracy_gpu_zone_begin_callstack_data (line 231) | struct ___tracy_gpu_zone_begin_callstack_data
type ___tracy_gpu_zone_begin_data (line 232) | struct ___tracy_gpu_zone_begin_data
type ___tracy_gpu_zone_begin_callstack_data (line 233) | struct ___tracy_gpu_zone_begin_callstack_data
type ___tracy_gpu_zone_end_data (line 234) | struct ___tracy_gpu_zone_end_data
type ___tracy_gpu_time_data (line 235) | struct ___tracy_gpu_time_data
type ___tracy_gpu_new_context_data (line 236) | struct ___tracy_gpu_new_context_data
type ___tracy_gpu_context_name_data (line 237) | struct ___tracy_gpu_context_name_data
type ___tracy_gpu_calibration_data (line 238) | struct ___tracy_gpu_calibration_data
type ___tracy_gpu_time_sync_data (line 239) | struct ___tracy_gpu_time_sync_data
type ___tracy_gpu_zone_begin_data (line 241) | struct ___tracy_gpu_zone_begin_data
type ___tracy_gpu_zone_begin_callstack_data (line 242) | struct ___tracy_gpu_zone_begin_callstack_data
type ___tracy_gpu_zone_begin_data (line 243) | struct ___tracy_gpu_zone_begin_data
type ___tracy_gpu_zone_begin_callstack_data (line 244) | struct ___tracy_gpu_zone_begin_callstack_data
type ___tracy_gpu_zone_end_data (line 245) | struct ___tracy_gpu_zone_end_data
type ___tracy_gpu_time_data (line 246) | struct ___tracy_gpu_time_data
type ___tracy_gpu_new_context_data (line 247) | struct ___tracy_gpu_new_context_data
type ___tracy_gpu_context_name_data (line 248) | struct ___tracy_gpu_context_name_data
type ___tracy_gpu_calibration_data (line 249) | struct ___tracy_gpu_calibration_data
type ___tracy_gpu_time_sync_data (line 250) | struct ___tracy_gpu_time_sync_data
type ___tracy_source_location_data (line 353) | struct ___tracy_source_location_data
type __tracy_lockable_context_data (line 354) | struct __tracy_lockable_context_data
type __tracy_lockable_context_data (line 355) | struct __tracy_lockable_context_data
type __tracy_lockable_context_data (line 356) | struct __tracy_lockable_context_data
type __tracy_lockable_context_data (line 357) | struct __tracy_lockable_context_data
type __tracy_lockable_context_data (line 358) | struct __tracy_lockable_context_data
type __tracy_lockable_context_data (line 359) | struct __tracy_lockable_context_data
type ___tracy_source_location_data (line 359) | struct ___tracy_source_location_data
type __tracy_lockable_context_data (line 360) | struct __tracy_lockable_context_data
FILE: tracy-client-sys/tracy/tracy/TracyCUDA.hpp
type IncrementalRegression (line 58) | struct IncrementalRegression {
type Parameters (line 60) | struct Parameters {
method parameters (line 71) | auto parameters() const {
method orthogonal (line 77) | auto orthogonal() const {
method addSample (line 86) | void addSample(float_t x, float_t y) {
function tracy_force_inline (line 98) | tracy_force_inline TracyTimestamp tracyGetTimestamp() {
function TracyTimestamp (line 109) | TracyTimestamp tracyFromCUpti(CUptiTimestamp cuptiTime) {
function tracy_force_inline (line 120) | tracy_force_inline void tracyMemWrite(T& where,U what) {
function tracyFree (line 129) | void tracyFree(void* ptr) {
function tracyZoneBegin (line 133) | void tracyZoneBegin(TracyTimestamp time, tracy::SourceLocationData* srcL...
function tracyZoneEnd (line 141) | void tracyZoneEnd(TracyTimestamp time) {
function tracyPlot (line 148) | void tracyPlot(const char* name, float value, TracyTimestamp time) {
function tracyPlot (line 157) | void tracyPlot(const char* name, float value, CUptiTimestamp time) {
function tracyPlotActivity (line 161) | void tracyPlotActivity(const char* name, TracyTimestamp start, TracyTime...
function tracyPlotActivity (line 168) | void tracyPlotActivity(const char* name, CUptiTimestamp start, CUptiTime...
function tracyPlotBlip (line 172) | void tracyPlotBlip(const char* name, TracyTimestamp time, float value = ...
function tracyPlotBlip (line 178) | void tracyPlotBlip(const char* name, CUptiTimestamp time, float value = ...
function tracyEmitMemAlloc (line 182) | void tracyEmitMemAlloc(const char* name, const void* ptr, size_t size, T...
function tracyEmitMemFree (line 211) | void tracyEmitMemFree(const char* name, const void* ptr, TracyTimestamp ...
function tracyEmitMemAlloc (line 228) | void tracyEmitMemAlloc(const char* name, const void* ptr, size_t size, C...
function tracyEmitMemFree (line 232) | void tracyEmitMemFree(const char* name, const void* ptr, CUptiTimestamp ...
function tracyAnnounceGpuTimestamp (line 236) | void tracyAnnounceGpuTimestamp(TracyTimestamp apiStart, TracyTimestamp a...
function tracySubmitGpuTimestamp (line 259) | void tracySubmitGpuTimestamp(CUptiTimestamp gpuStart, CUptiTimestamp gpu...
function CUptiResult (line 282) | CUptiResult CUptiCallChecked(CUptiResult result, const char* call, const...
function CUresult (line 292) | CUresult cudaDriverCallChecked(CUresult result, const char* call, const ...
type ConcurrentHashMap (line 303) | struct ConcurrentHashMap {
method acquire_read_lock (line 305) | auto acquire_read_lock() {
method acquire_write_lock (line 311) | auto acquire_write_lock() {
method find (line 329) | auto find(TKey key) {
method fetch (line 334) | auto fetch(TKey key, TValue& value) {
method end (line 343) | auto end() {
method emplace (line 349) | auto emplace(TKey key, Args&&... args) {
method erase (line 354) | auto erase(TKey key) {
type ProfilerStats (line 362) | struct ProfilerStats {
method update (line 367) | void update(CUpti_CallbackDomain domain, CUpti_CallbackId cbid) {
type StringTable (line 380) | struct StringTable {
type SourceLocationMap (line 409) | struct SourceLocationMap {
type SourceLocationLUT (line 441) | struct SourceLocationLUT {
function tracyTimelineId (line 476) | uint32_t tracyTimelineId(uint32_t contextId, uint32_t streamId) {
type tracy (line 487) | namespace tracy
class CUDACtx (line 489) | class CUDACtx
method CUDACtx (line 492) | static CUDACtx* Create() {
method Destroy (line 504) | static void Destroy(CUDACtx* ctx) {
method Collect (line 515) | void Collect()
method printStats (line 521) | void printStats()
method StartProfiling (line 544) | void StartProfiling()
method StopProfiling (line 550) | void StopProfiling()
method Name (line 557) | void Name(const char *name, uint16_t len)
method tracy_force_inline (line 570) | tracy_force_inline void SubmitQueueItem(tracy::QueueItem *item)
method QueryTimestamps (line 578) | static void QueryTimestamps(TracyTimestamp& tTracy, CUptiTimestamp& ...
method Recalibrate (line 589) | void Recalibrate() {
method EmitGpuZone (line 625) | void EmitGpuZone(TracyTimestamp apiStart, TracyTimestamp apiEnd,
method OnEventsProcessed (line 636) | void OnEventsProcessed() {
type CUPTI (line 640) | struct CUPTI {
method OnBufferRequested (line 641) | static void CUPTIAPI OnBufferRequested(uint8_t **buffer, size_t *s...
method OnBufferCompleted (line 653) | static void CUPTIAPI OnBufferCompleted(CUcontext ctx, uint32_t str...
type APICallInfo (line 676) | struct APICallInfo { TracyTimestamp start = 0, end = 0; CUptiTimes...
method OnCallbackAPI (line 678) | static void CUPTIAPI OnCallbackAPI(
method matchActivityToAPICall (line 844) | static bool matchActivityToAPICall(uint32_t correlationId, APICall...
method matchError (line 856) | static void matchError(uint32_t correlationId, const char* kind) {
method extractActualName (line 862) | static std::string extractActualName(char** name){
method extractActualNameNested (line 891) | static std::string extractActualNameNested(const char* demangledName)
method DoProcessDeviceEvent (line 946) | static void DoProcessDeviceEvent(CUpti_Activity *record)
method BeginInstrumentation (line 1104) | static void BeginInstrumentation(CUDACtx* profilerHost) {
method EndInstrumentation (line 1132) | static void EndInstrumentation() {
method FlushActivity (line 1163) | static void FlushActivity()
type Collector (line 1179) | struct Collector {
method FlushActivityAsync (line 1205) | static void FlushActivityAsync()
type PersistentState (line 1214) | struct PersistentState {
method PersistentState (line 1231) | static PersistentState& Get() {
method CUDACtx (line 1239) | CUDACtx(uint8_t gpuContextID = 255)
type Singleton (line 1292) | struct Singleton {
method Singleton (line 1297) | static Singleton& Get() {
FILE: tracy-client-sys/tracy/tracy/TracyD3D11.hpp
type tracy (line 26) | namespace tracy
class D3D11ZoneScope (line 28) | class D3D11ZoneScope {}
method tracy_force_inline (line 305) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 314) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 331) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 342) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 361) | tracy_force_inline ~D3D11ZoneScope()
method tracy_force_inline (line 378) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, bool active )
method WriteQueueItem (line 389) | void WriteQueueItem(tracy::QueueItem* item, tracy::QueueType queueIt...
class D3D11Ctx (line 51) | class D3D11Ctx
type CollectMode (line 57) | enum CollectMode { POLL, BLOCK }
method D3D11Ctx (line 60) | D3D11Ctx( ID3D11Device* device, ID3D11DeviceContext* devicectx )
method Name (line 163) | void Name( const char* name, uint16_t len )
method Collect (line 179) | void Collect(CollectMode mode = POLL)
method tracy_force_inline (line 247) | tracy_force_inline uint32_t RingIndex(uintptr_t index)
method tracy_force_inline (line 253) | tracy_force_inline uint32_t RingCount(uintptr_t begin, uintptr_t end)
method tracy_force_inline (line 260) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 271) | tracy_force_inline ID3D11Query* GetQueryObjectFromId(uint32_t id)
method tracy_force_inline (line 276) | tracy_force_inline void WaitForQuery(ID3D11Query* query)
method tracy_force_inline (line 283) | tracy_force_inline uint8_t GetContextId() const
class D3D11ZoneScope (line 302) | class D3D11ZoneScope
method tracy_force_inline (line 305) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 314) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 331) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 342) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 361) | tracy_force_inline ~D3D11ZoneScope()
method tracy_force_inline (line 378) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, bool active )
method WriteQueueItem (line 389) | void WriteQueueItem(tracy::QueueItem* item, tracy::QueueType queueIt...
function D3D11Ctx (line 408) | static inline D3D11Ctx* CreateD3D11Context( ID3D11Device* device, ID3D...
type CollectMode (line 57) | enum CollectMode { POLL, BLOCK }
method D3D11Ctx (line 60) | D3D11Ctx( ID3D11Device* device, ID3D11DeviceContext* devicectx )
method Name (line 163) | void Name( const char* name, uint16_t len )
method Collect (line 179) | void Collect(CollectMode mode = POLL)
method tracy_force_inline (line 247) | tracy_force_inline uint32_t RingIndex(uintptr_t index)
method tracy_force_inline (line 253) | tracy_force_inline uint32_t RingCount(uintptr_t begin, uintptr_t end)
method tracy_force_inline (line 260) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 271) | tracy_force_inline ID3D11Query* GetQueryObjectFromId(uint32_t id)
method tracy_force_inline (line 276) | tracy_force_inline void WaitForQuery(ID3D11Query* query)
method tracy_force_inline (line 283) | tracy_force_inline uint8_t GetContextId() const
function DestroyD3D11Context (line 415) | static inline void DestroyD3D11Context( D3D11Ctx* ctx )
type tracy (line 48) | namespace tracy
class D3D11ZoneScope (line 28) | class D3D11ZoneScope {}
method tracy_force_inline (line 305) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 314) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 331) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 342) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 361) | tracy_force_inline ~D3D11ZoneScope()
method tracy_force_inline (line 378) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, bool active )
method WriteQueueItem (line 389) | void WriteQueueItem(tracy::QueueItem* item, tracy::QueueType queueIt...
class D3D11Ctx (line 51) | class D3D11Ctx
type CollectMode (line 57) | enum CollectMode { POLL, BLOCK }
method D3D11Ctx (line 60) | D3D11Ctx( ID3D11Device* device, ID3D11DeviceContext* devicectx )
method Name (line 163) | void Name( const char* name, uint16_t len )
method Collect (line 179) | void Collect(CollectMode mode = POLL)
method tracy_force_inline (line 247) | tracy_force_inline uint32_t RingIndex(uintptr_t index)
method tracy_force_inline (line 253) | tracy_force_inline uint32_t RingCount(uintptr_t begin, uintptr_t end)
method tracy_force_inline (line 260) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 271) | tracy_force_inline ID3D11Query* GetQueryObjectFromId(uint32_t id)
method tracy_force_inline (line 276) | tracy_force_inline void WaitForQuery(ID3D11Query* query)
method tracy_force_inline (line 283) | tracy_force_inline uint8_t GetContextId() const
class D3D11ZoneScope (line 302) | class D3D11ZoneScope
method tracy_force_inline (line 305) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 314) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, const SourceLocati...
method tracy_force_inline (line 331) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 342) | tracy_force_inline D3D11ZoneScope(D3D11Ctx* ctx, uint32_t line, cons...
method tracy_force_inline (line 361) | tracy_force_inline ~D3D11ZoneScope()
method tracy_force_inline (line 378) | tracy_force_inline D3D11ZoneScope( D3D11Ctx* ctx, bool active )
method WriteQueueItem (line 389) | void WriteQueueItem(tracy::QueueItem* item, tracy::QueueType queueIt...
function D3D11Ctx (line 408) | static inline D3D11Ctx* CreateD3D11Context( ID3D11Device* device, ID3D...
type CollectMode (line 57) | enum CollectMode { POLL, BLOCK }
method D3D11Ctx (line 60) | D3D11Ctx( ID3D11Device* device, ID3D11DeviceContext* devicectx )
method Name (line 163) | void Name( const char* name, uint16_t len )
method Collect (line 179) | void Collect(CollectMode mode = POLL)
method tracy_force_inline (line 247) | tracy_force_inline uint32_t RingIndex(uintptr_t index)
method tracy_force_inline (line 253) | tracy_force_inline uint32_t RingCount(uintptr_t begin, uintptr_t end)
method tracy_force_inline (line 260) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 271) | tracy_force_inline ID3D11Query* GetQueryObjectFromId(uint32_t id)
method tracy_force_inline (line 276) | tracy_force_inline void WaitForQuery(ID3D11Query* query)
method tracy_force_inline (line 283) | tracy_force_inline uint8_t GetContextId() const
function DestroyD3D11Context (line 415) | static inline void DestroyD3D11Context( D3D11Ctx* ctx )
FILE: tracy-client-sys/tracy/tracy/TracyD3D12.hpp
type tracy (line 26) | namespace tracy
class D3D12ZoneScope (line 28) | class D3D12ZoneScope {}
method tracy_force_inline (line 351) | tracy_force_inline void WriteQueueItem(QueueItem* item, QueueType ty...
method tracy_force_inline (line 362) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 379) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 388) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 397) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 408) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 419) | tracy_force_inline ~D3D12ZoneScope()
type D3D12QueryPayload (line 50) | struct D3D12QueryPayload
class D3D12QueueCtx (line 57) | class D3D12QueueCtx
method RecalibrateClocks (line 78) | void RecalibrateClocks()
method tracy_force_inline (line 107) | tracy_force_inline void SubmitQueueItem(tracy::QueueItem* item)
method D3D12QueueCtx (line 116) | D3D12QueueCtx(ID3D12Device* device, ID3D12CommandQueue* queue)
method NewFrame (line 234) | void NewFrame()
method Name (line 248) | void Name( const char* name, uint16_t len )
method Collect (line 261) | void Collect()
method tracy_force_inline (line 324) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 338) | tracy_force_inline uint8_t GetId() const
class D3D12ZoneScope (line 344) | class D3D12ZoneScope
method tracy_force_inline (line 351) | tracy_force_inline void WriteQueueItem(QueueItem* item, QueueType ty...
method tracy_force_inline (line 362) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 379) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 388) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 397) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 408) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 419) | tracy_force_inline ~D3D12ZoneScope()
function D3D12QueueCtx (line 438) | static inline D3D12QueueCtx* CreateD3D12Context(ID3D12Device* device, ...
method RecalibrateClocks (line 78) | void RecalibrateClocks()
method tracy_force_inline (line 107) | tracy_force_inline void SubmitQueueItem(tracy::QueueItem* item)
method D3D12QueueCtx (line 116) | D3D12QueueCtx(ID3D12Device* device, ID3D12CommandQueue* queue)
method NewFrame (line 234) | void NewFrame()
method Name (line 248) | void Name( const char* name, uint16_t len )
method Collect (line 261) | void Collect()
method tracy_force_inline (line 324) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 338) | tracy_force_inline uint8_t GetId() const
function DestroyD3D12Context (line 446) | static inline void DestroyD3D12Context(D3D12QueueCtx* ctx)
type tracy (line 47) | namespace tracy
class D3D12ZoneScope (line 28) | class D3D12ZoneScope {}
method tracy_force_inline (line 351) | tracy_force_inline void WriteQueueItem(QueueItem* item, QueueType ty...
method tracy_force_inline (line 362) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 379) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 388) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 397) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 408) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 419) | tracy_force_inline ~D3D12ZoneScope()
type D3D12QueryPayload (line 50) | struct D3D12QueryPayload
class D3D12QueueCtx (line 57) | class D3D12QueueCtx
method RecalibrateClocks (line 78) | void RecalibrateClocks()
method tracy_force_inline (line 107) | tracy_force_inline void SubmitQueueItem(tracy::QueueItem* item)
method D3D12QueueCtx (line 116) | D3D12QueueCtx(ID3D12Device* device, ID3D12CommandQueue* queue)
method NewFrame (line 234) | void NewFrame()
method Name (line 248) | void Name( const char* name, uint16_t len )
method Collect (line 261) | void Collect()
method tracy_force_inline (line 324) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 338) | tracy_force_inline uint8_t GetId() const
class D3D12ZoneScope (line 344) | class D3D12ZoneScope
method tracy_force_inline (line 351) | tracy_force_inline void WriteQueueItem(QueueItem* item, QueueType ty...
method tracy_force_inline (line 362) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 379) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 388) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, ID3D12Graphics...
method tracy_force_inline (line 397) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 408) | tracy_force_inline D3D12ZoneScope(D3D12QueueCtx* ctx, uint32_t line,...
method tracy_force_inline (line 419) | tracy_force_inline ~D3D12ZoneScope()
function D3D12QueueCtx (line 438) | static inline D3D12QueueCtx* CreateD3D12Context(ID3D12Device* device, ...
method RecalibrateClocks (line 78) | void RecalibrateClocks()
method tracy_force_inline (line 107) | tracy_force_inline void SubmitQueueItem(tracy::QueueItem* item)
method D3D12QueueCtx (line 116) | D3D12QueueCtx(ID3D12Device* device, ID3D12CommandQueue* queue)
method NewFrame (line 234) | void NewFrame()
method Name (line 248) | void Name( const char* name, uint16_t len )
method Collect (line 261) | void Collect()
method tracy_force_inline (line 324) | tracy_force_inline uint32_t NextQueryId()
method tracy_force_inline (line 338) | tracy_force_inline uint8_t GetId() const
function DestroyD3D12Context (line 446) | static inline void DestroyD3D12Context(D3D12QueueCtx* ctx)
FILE: tracy-client-sys/tracy/tracy/TracyLua.hpp
type tracy (line 10) | namespace tracy
type detail (line 13) | namespace detail
function noop (line 15) | static inline int noop( lua_State* L ) { return 0; }
function LuaShortenSrc (line 148) | static inline void LuaShortenSrc( char* dst, const char* src )
function tracy_force_inline (line 156) | static tracy_force_inline void SendLuaCallstack( lua_State* L, uint3...
function LuaZoneBeginS (line 200) | static inline int LuaZoneBeginS( lua_State* L )
function LuaZoneBeginNS (line 231) | static inline int LuaZoneBeginNS( lua_State* L )
function LuaZoneBegin (line 265) | static inline int LuaZoneBegin( lua_State* L )
function LuaZoneBeginN (line 292) | static inline int LuaZoneBeginN( lua_State* L )
function LuaZoneEnd (line 321) | static inline int LuaZoneEnd( lua_State* L )
function LuaZoneText (line 340) | static inline int LuaZoneText( lua_State* L )
function LuaZoneName (line 365) | static inline int LuaZoneName( lua_State* L )
function LuaMessage (line 390) | static inline int LuaMessage( lua_State* L )
function LuaRegister (line 18) | static inline void LuaRegister( lua_State* L )
function LuaRemove (line 52) | static inline void LuaRemove( char* script )
function LuaHook (line 123) | static inline void LuaHook( lua_State* L, lua_Debug* ar ) {}
type detail (line 145) | namespace detail
function noop (line 15) | static inline int noop( lua_State* L ) { return 0; }
function LuaShortenSrc (line 148) | static inline void LuaShortenSrc( char* dst, const char* src )
function tracy_force_inline (line 156) | static tracy_force_inline void SendLuaCallstack( lua_State* L, uint3...
function LuaZoneBeginS (line 200) | static inline int LuaZoneBeginS( lua_State* L )
function LuaZoneBeginNS (line 231) | static inline int LuaZoneBeginNS( lua_State* L )
function LuaZoneBegin (line 265) | static inline int LuaZoneBegin( lua_State* L )
function LuaZoneBeginN (line 292) | static inline int LuaZoneBeginN( lua_State* L )
function LuaZoneEnd (line 321) | static inline int LuaZoneEnd( lua_State* L )
function LuaZoneText (line 340) | static inline int LuaZoneText( lua_State* L )
function LuaZoneName (line 365) | static inline int LuaZoneName( lua_State* L )
function LuaMessage (line 390) | static inline int LuaMessage( lua_State* L )
function LuaRegister (line 413) | static inline void LuaRegister( lua_State* L )
function LuaRemove (line 442) | static inline void LuaRemove( char* script ) {}
function LuaHook (line 444) | static inline void LuaHook( lua_State* L, lua_Debug* ar )
type tracy (line 138) | namespace tracy
type detail (line 13) | namespace detail
function noop (line 15) | static inline int noop( lua_State* L ) { return 0; }
function LuaShortenSrc (line 148) | static inline void LuaShortenSrc( char* dst, const char* src )
function tracy_force_inline (line 156) | static tracy_force_inline void SendLuaCallstack( lua_State* L, uint3...
function LuaZoneBeginS (line 200) | static inline int LuaZoneBeginS( lua_State* L )
function LuaZoneBeginNS (line 231) | static inline int LuaZoneBeginNS( lua_State* L )
function LuaZoneBegin (line 265) | static inline int LuaZoneBegin( lua_State* L )
function LuaZoneBeginN (line 292) | static inline int LuaZoneBeginN( lua_State* L )
function LuaZoneEnd (line 321) | static inline int LuaZoneEnd( lua_State* L )
function LuaZoneText (line 340) | static inline int LuaZoneText( lua_State* L )
function LuaZoneName (line 365) | static inline int LuaZoneName( lua_State* L )
function LuaMessage (line 390) | static inline int LuaMessage( lua_State* L )
function LuaRegister (line 18) | static inline void LuaRegister( lua_State* L )
function LuaRemove (line 52) | static inline void LuaRemove( char* script )
function LuaHook (line 123) | static inline void LuaHook( lua_State* L, lua_Debug* ar ) {}
type detail (line 145) | namespace detail
function noop (line 15) | static inline int noop( lua_State* L ) { return 0; }
function LuaShortenSrc (line 148) | static inline void LuaShortenSrc( char* dst, const char* src )
function tracy_force_inline (line 156) | static tracy_force_inline void SendLuaCallstack( lua_State* L, uint3...
function LuaZoneBeginS (line 200) | static inline int LuaZoneBeginS( lua_State* L )
function LuaZoneBeginNS (line 231) | static inline int LuaZoneBeginNS( lua_State* L )
function LuaZoneBegin (line 265) | static inline int LuaZoneBegin( lua_State* L )
function LuaZoneBeginN (line 292) | static inline int LuaZoneBeginN( lua_State* L )
function LuaZoneEnd (line 321) | static inline int LuaZoneEnd( lua_State* L )
function LuaZoneText (line 340) | static inline int LuaZoneText( lua_State* L )
function LuaZoneName (line 365) | static inline int LuaZoneName( lua_State* L )
function LuaMessage (line 390) | static inline int LuaMessage( lua_State* L )
function LuaRegister (line 413) | static inline void LuaRegister( lua_State* L )
function LuaRemove (line 442) | static inline void LuaRemove( char* script ) {}
function LuaHook (line 444) | static inline void LuaHook( lua_State* L, lua_Debug* ar )
FILE: tracy-client-sys/tracy/tracy/TracyOpenCL.hpp
type tracy (line 27) | namespace tracy
class OpenCLCtxScope (line 29) | class OpenCLCtxScope {}
type EventPhase (line 64) | enum class EventPhase : uint8_t
type EventInfo (line 70) | struct EventInfo
class OpenCLCtx (line 76) | class OpenCLCtx
method OpenCLCtx (line 81) | OpenCLCtx(cl_context context, cl_device_id device)
method Name (line 124) | void Name( const char* name, uint16_t len )
method Collect (line 140) | void Collect()
method tracy_force_inline (line 203) | tracy_force_inline uint8_t GetId() const
method NextQueryId (line 208) | tracy_force_inline unsigned int NextQueryId(EventInfo eventInfo)
method tracy_force_inline (line 217) | tracy_force_inline EventInfo& GetQuery(unsigned int id)
class OpenCLCtxScope (line 233) | class OpenCLCtxScope {
function tracy_force_inline (line 331) | tracy_force_inline void SetEvent(cl_event event)
function tracy_force_inline (line 339) | tracy_force_inline ~OpenCLCtxScope()
function OpenCLCtx (line 359) | static inline OpenCLCtx* CreateCLContext(cl_context context, cl_device_i...
method OpenCLCtx (line 81) | OpenCLCtx(cl_context context, cl_device_id device)
method Name (line 124) | void Name( const char* name, uint16_t len )
method Collect (line 140) | void Collect()
method tracy_force_inline (line 203) | tracy_force_inline uint8_t GetId() const
method NextQueryId (line 208) | tracy_force_inline unsigned int NextQueryId(EventInfo eventInfo)
method tracy_force_inline (line 217) | tracy_force_inline EventInfo& GetQuery(unsigned int id)
function DestroyCLContext (line 366) | static inline void DestroyCLContext(OpenCLCtx* ctx)
FILE: tracy-client-sys/tracy/tracy/TracyOpenGL.hpp
type tracy (line 21) | namespace tracy
type SourceLocationData (line 23) | struct SourceLocationData
class GpuCtxScope (line 24) | class GpuCtxScope
method GpuCtxScope (line 27) | GpuCtxScope( const SourceLocationData*, bool ) {}
method GpuCtxScope (line 28) | GpuCtxScope( const SourceLocationData*, int32_t, bool ) {}
class GpuCtx (line 86) | class GpuCtx
method GpuCtx (line 93) | GpuCtx()
method Name (line 127) | void Name( const char* name, uint16_t len )
method Collect (line 142) | void Collect()
method NextQueryId (line 176) | tracy_force_inline unsigned int NextQueryId()
method TranslateOpenGlQueryId (line 184) | tracy_force_inline unsigned int TranslateOpenGlQueryId( unsigned int id )
method tracy_force_inline (line 189) | tracy_force_inline uint8_t GetId() const
function tracy_force_inline (line 204) | tracy_force_inline GpuCtxScope( const SourceLocationData* srcloc, bool i...
function tracy_force_inline (line 225) | tracy_force_inline GpuCtxScope( const SourceLocationData* srcloc, int32_...
function m_active (line 254) | m_active( is_active && GetProfiler().IsConnected() )
function m_active (line 276) | m_active( is_active && GetProfiler().IsConnected() )
function tracy_force_inline (line 302) | tracy_force_inline ~GpuCtxScope()
FILE: tracy-client-sys/tracy/tracy/TracyVulkan.hpp
type tracy (line 27) | namespace tracy
class VkCtxScope (line 29) | class VkCtxScope {}
type VkSymbolTable (line 73) | struct VkSymbolTable
function VkCtx (line 100) | VkCtx( VkPhysicalDevice physdev, VkDevice device, VkQueue queue, VkComma...
function VkCtx (line 185) | VkCtx( VkPhysicalDevice physdev, VkDevice device, PFN_vkResetQueryPoolEX...
function Name (line 234) | void Name( const char* name, uint16_t len )
function Collect (line 250) | void Collect( VkCommandBuffer cmdbuf )
function NextQueryId (line 338) | tracy_force_inline unsigned int NextQueryId()
function tracy_force_inline (line 344) | tracy_force_inline uint8_t GetId() const
function GetQueryPool (line 349) | GetQueryPool() const
function tracy_force_inline (line 355) | tracy_force_inline void Calibrate( VkDevice device, int64_t& tCpu, int64...
function tracy_force_inline (line 381) | tracy_force_inline void CreateQueryPool()
function tracy_force_inline (line 394) | tracy_force_inline void FindAvailableTimeDomains( VkPhysicalDevice physi...
function tracy_force_inline (line 415) | tracy_force_inline void FindCalibratedTimestampDeviation()
function tracy_force_inline (line 441) | tracy_force_inline void WriteInitialItem( VkPhysicalDevice physdev, int6...
function PopulateSymbolTable (line 467) | void PopulateSymbolTable( VkInstance instance, PFN_vkGetInstanceProcAddr...
function tracy_force_inline (line 515) | tracy_force_inline VkCtxScope( VkCtx* ctx, const SourceLocationData* src...
function tracy_force_inline (line 539) | tracy_force_inline VkCtxScope( VkCtx* ctx, const SourceLocationData* src...
function m_active (line 574) | m_active( is_active && GetProfiler().IsConnected() )
function m_active (line 599) | m_active( is_active && GetProfiler().IsConnected() )
function tracy_force_inline (line 631) | tracy_force_inline ~VkCtxScope()
function VkCtx (line 657) | static inline VkCtx* CreateVkContext( VkPhysicalDevice physdev, VkDevice...
function VkCtx (line 673) | static inline VkCtx* CreateVkContext( VkPhysicalDevice physdev, VkDevice...
function DestroyVkContext (line 686) | static inline void DestroyVkContext( VkCtx* ctx )
FILE: tracy-client/benches/client.rs
function client_start (line 4) | fn client_start(c: &mut Criterion) {
function client_clone (line 9) | fn client_clone(c: &mut Criterion) {
function client_running (line 15) | fn client_running(c: &mut Criterion) {
function ops_alloc (line 20) | fn ops_alloc(c: &mut Criterion) {
function ops_static (line 38) | fn ops_static(c: &mut Criterion) {
FILE: tracy-client/src/demangle.rs
type Buffer (line 24) | pub struct Buffer(String);
method write_str (line 28) | fn write_str(&mut self, s: &str) -> fmt::Result {
method write_char (line 33) | fn write_char(&mut self, c: char) -> fmt::Result {
method new (line 39) | const fn new() -> Self {
method clear_on_err (line 43) | fn clear_on_err<T, E>(&mut self, f: impl FnOnce(&mut Self) -> Result<T...
function default (line 55) | pub fn default(s: &str, buffer: &mut impl fmt::Write) -> fmt::Result {
function noop (line 66) | pub fn noop(_: &str, _: &mut impl fmt::Write) -> fmt::Result {
function implementation (line 77) | pub unsafe fn implementation<F>(mangled: *const c_char, run: F) -> *cons...
FILE: tracy-client/src/frame.rs
type Frame (line 6) | pub struct Frame(Client, FrameName);
type FrameName (line 12) | pub struct FrameName(pub(crate) &'static str);
method new_leak (line 25) | pub fn new_leak(name: String) -> Self {
method frame_mark (line 61) | pub fn frame_mark(&self) {
method secondary_frame_mark (line 87) | pub fn secondary_frame_mark(&self, name: FrameName) {
method non_continuous_frame (line 109) | pub fn non_continuous_frame(&self, name: FrameName) -> Frame {
method frame_image (line 132) | pub fn frame_image(&self, image: &[u8], width: u16, height: u16, offset:...
method drop (line 155) | fn drop(&mut self) {
function frame_mark (line 171) | pub fn frame_mark() {
function frame_image (line 178) | pub fn frame_image(image: &[u8], width: u16, height: u16, offset: u8, fl...
FILE: tracy-client/src/gpu.rs
type GpuContextType (line 15) | pub enum GpuContextType {
type GpuContext (line 73) | pub struct GpuContext {
method alloc_span_ids (line 226) | fn alloc_span_ids(&self) -> Result<(u16, u16), GpuSpanCreationError> {
method span (line 245) | pub fn span(
method span_alloc (line 283) | pub fn span_alloc(
method begin_span (line 335) | pub fn begin_span(&self, span_location: &'static SpanLocation, query_i...
method begin_span_alloc (line 358) | pub fn begin_span_alloc(
method end_span (line 401) | pub fn end_span(&self, query_id: u16) {
method upload_gpu_timestamp (line 414) | pub fn upload_gpu_timestamp(&self, query_id: u16, gpu_timestamp: i64) {
method sync_gpu_time (line 435) | pub fn sync_gpu_time(&self, gpu_timestamp: i64) {
type GpuContextCreationError (line 87) | pub enum GpuContextCreationError {
method fmt (line 93) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type GpuSpanState (line 104) | enum GpuSpanState {
type GpuSpan (line 122) | pub struct GpuSpan {
method end_zone (line 453) | pub fn end_zone(&mut self) {
method upload_timestamp_start (line 477) | pub fn upload_timestamp_start(&self, start_timestamp: i64) {
method upload_timestamp_end (line 496) | pub fn upload_timestamp_end(&self, end_timestamp: i64) {
type GpuSpanCreationError (line 136) | pub enum GpuSpanCreationError {
method fmt (line 142) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method new_gpu_context (line 165) | pub fn new_gpu_context(
method drop (line 509) | fn drop(&mut self) {
FILE: tracy-client/src/lib.rs
function make_span_location (line 65) | pub fn make_span_location(
function create_frame_name (line 91) | pub const unsafe fn create_frame_name(name: &'static str) -> crate::fram...
function create_plot (line 97) | pub const unsafe fn create_plot(name: &'static str) -> crate::plot::Plot...
function set_thread_name (line 103) | pub unsafe fn set_thread_name(name: *const u8) {
type Client (line 127) | pub struct Client(());
method message (line 138) | pub fn message(&self, message: &str, callstack_depth: u16) {
method color_message (line 155) | pub fn color_message(&self, message: &str, rgba: u32, callstack_depth:...
method set_thread_name (line 175) | pub fn set_thread_name(&self, name: &str) {
type ProfiledAllocator (line 220) | pub struct ProfiledAllocator<T>(T, u16);
function new (line 229) | pub const fn new(inner_allocator: T, callstack_depth: u16) -> Self {
function emit_alloc (line 233) | fn emit_alloc(&self, ptr: *mut u8, size: usize) {
function emit_free (line 246) | fn emit_free(&self, ptr: *mut u8) {
function alloc (line 259) | unsafe fn alloc(&self, layout: alloc::Layout) -> *mut u8 {
function dealloc (line 268) | unsafe fn dealloc(&self, ptr: *mut u8, layout: alloc::Layout) {
function alloc_zeroed (line 276) | unsafe fn alloc_zeroed(&self, layout: alloc::Layout) -> *mut u8 {
function realloc (line 285) | unsafe fn realloc(&self, ptr: *mut u8, layout: alloc::Layout, new_size: ...
function adjust_stack_depth (line 297) | pub(crate) const fn adjust_stack_depth(depth: u16) -> u16 {
FILE: tracy-client/src/plot.rs
type PlotName (line 7) | pub struct PlotName(pub(crate) &'static str);
method new_leak (line 122) | pub fn new_leak(name: String) -> Self {
type PlotFormat (line 12) | pub enum PlotFormat {
type PlotLineStyle (line 30) | pub enum PlotLineStyle {
type PlotConfiguration (line 49) | pub struct PlotConfiguration {
method format (line 65) | pub fn format(mut self, format: PlotFormat) -> Self {
method line_style (line 71) | pub fn line_style(mut self, line_style: PlotLineStyle) -> Self {
method fill (line 77) | pub fn fill(mut self, fill: bool) -> Self {
method color (line 95) | pub fn color(mut self, color: Option<u32>) -> Self {
method default (line 102) | fn default() -> Self {
method plot (line 152) | pub fn plot(&self, plot_name: PlotName, value: f64) {
method plot_config (line 171) | pub fn plot_config(&self, plot_name: PlotName, configuration: PlotConfig...
FILE: tracy-client/src/span.rs
type Span (line 7) | pub struct Span {
method emit_value (line 150) | pub fn emit_value(&self, value: u64) {
method emit_text (line 159) | pub fn emit_text(&self, text: &str) {
method emit_color (line 171) | pub fn emit_color(&self, color: u32) {
type SpanLocation (line 21) | pub struct SpanLocation {
method span (line 62) | pub fn span(self, loc: &'static SpanLocation, callstack_depth: u16) -> S...
method span_alloc (line 109) | pub fn span_alloc(
method drop (line 182) | fn drop(&mut self) {
FILE: tracy-client/src/state.rs
method start (line 27) | pub fn start() -> Self {
method running (line 38) | pub fn running() -> Option<Self> {
method is_running (line 47) | pub fn is_running() -> bool {
method is_connected (line 59) | pub fn is_connected() -> bool {
method clone (line 70) | fn clone(&self) -> Self {
constant STATE_STEP (line 112) | const STATE_STEP: usize = 1;
constant STATE_DISABLED (line 113) | const STATE_DISABLED: usize = 0;
constant STATE_ENABLING (line 114) | const STATE_ENABLING: usize = STATE_DISABLED + STATE_STEP;
constant STATE_ENABLED (line 115) | const STATE_ENABLED: usize = STATE_ENABLING + STATE_STEP;
function spin_loop (line 118) | fn spin_loop() {
function start (line 125) | pub(super) fn start() -> super::Client {
function is_running (line 170) | pub(super) fn is_running() -> bool {
function state_transitions (line 179) | fn state_transitions() {
FILE: tracy-client/tests/loom.rs
function model (line 7) | fn model<F>(f: F)
function main (line 23) | fn main() {
function main (line 73) | fn main() {
FILE: tracy-client/tests/tests.rs
function basic_zone (line 9) | fn basic_zone() {
function alloc_zone (line 19) | fn alloc_zone() {
function finish_frameset (line 27) | fn finish_frameset() {
function finish_secondary_frameset (line 35) | fn finish_secondary_frameset() {
function non_continuous_frameset (line 43) | fn non_continuous_frameset() {
function plot_something (line 50) | fn plot_something() {
function allocations (line 60) | fn allocations() {
function fib (line 67) | fn fib(i: u16) -> u64 {
function message (line 79) | fn message() {
function tls_confusion (line 85) | fn tls_confusion() {
function set_thread_name (line 94) | fn set_thread_name() {
function nameless_span (line 99) | fn nameless_span() {
function gpu (line 106) | fn gpu() {
function main (line 135) | fn main() {
Condensed preview — 121 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,966K chars).
[
{
"path": ".github/workflows/sys-update.yml",
"chars": 1254,
"preview": "name: Update the tracy-client-sys crate\n\non:\n workflow_dispatch:\n schedule:\n - cron: '37 0/6 * * *'\njobs:\n update:"
},
{
"path": ".github/workflows/test.yml",
"chars": 3110,
"preview": "concurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\non:\n push:\n branches: [ma"
},
{
"path": ".gitignore",
"chars": 18,
"preview": "target\nCargo.lock\n"
},
{
"path": "Cargo.toml",
"chars": 327,
"preview": "[workspace]\nmembers = [\n \"tracy-client-sys\",\n \"tracy-client\",\n \"tracing-tracy\",\n \"examples\",\n]\nresolver = \"2"
},
{
"path": "FEATURES.mkd",
"chars": 3094,
"preview": "* `enable` – enables the Tracy client. Corresponds to the `TRACY_ENABLE` define.\n* `flush-on-exit` – waits for Tracy to "
},
{
"path": "LICENSE-APACHE",
"chars": 9723,
"preview": " Apache License\n Version 2.0, January 2004\n http"
},
{
"path": "LICENSE-MIT",
"chars": 1023,
"preview": "Permission is hereby granted, free of charge, to any\nperson obtaining a copy of this software and associated\ndocumentati"
},
{
"path": "README.mkd",
"chars": 3671,
"preview": "# Tracy profiler clients in Rust\n\nThis project contains Rust crates for producing [Tracy profiler](https://github.com/wo"
},
{
"path": "examples/Cargo.toml",
"chars": 507,
"preview": "[package]\r\nname = \"tracy-client-examples\"\r\npublish = false\r\nversion = \"0.17.4\" # AUTO-BUMP\r\nauthors = [\"Nathan Adams <di"
},
{
"path": "examples/README.mkd",
"chars": 508,
"preview": "# Examples for Tracy integration\n\nThese examples exist to demonstrate how to integrate the rust-Tracy API within an appl"
},
{
"path": "examples/src/main.rs",
"chars": 1501,
"preview": "mod plots;\nmod secondary_frames;\nmod threads;\nmod wgpu_frame_images;\nmod zones;\n\nstruct ExampleDesc {\n name: &'static"
},
{
"path": "examples/src/plots/mod.rs",
"chars": 1403,
"preview": "use rand::Rng;\nuse std::thread::sleep;\nuse std::time::Duration;\nuse tracy_client::{Client, PlotConfiguration, PlotFormat"
},
{
"path": "examples/src/secondary_frames/mod.rs",
"chars": 1182,
"preview": "use rand::rngs::ThreadRng;\nuse rand::Rng;\nuse std::thread::sleep;\nuse std::time::Duration;\nuse tracy_client::{non_contin"
},
{
"path": "examples/src/threads/mod.rs",
"chars": 2916,
"preview": "use rand::rngs::ThreadRng;\nuse rand::{thread_rng, Rng, RngCore};\nuse std::thread::{sleep, spawn};\nuse std::time::Duratio"
},
{
"path": "examples/src/wgpu_frame_images/blit.wgsl",
"chars": 905,
"preview": "@group(0) @binding(0) var frame_sampler: sampler;\r\n@group(0) @binding(1) var frame_texture: texture_2d<f32>;\r\n\r\nstruct V"
},
{
"path": "examples/src/wgpu_frame_images/mod.rs",
"chars": 17887,
"preview": "use futures::executor::block_on;\nuse std::borrow::Cow;\nuse std::sync::atomic::{AtomicBool, Ordering};\nuse std::sync::Arc"
},
{
"path": "examples/src/wgpu_frame_images/triangle.wgsl",
"chars": 1264,
"preview": "@group(0) @binding(0) var<uniform> time: f32;\r\n\r\nstruct VertexOutput {\r\n @builtin(position) position: vec4<f32>,\r\n "
},
{
"path": "examples/src/zones/mod.rs",
"chars": 2411,
"preview": "use rand::rngs::ThreadRng;\nuse rand::{Rng, RngCore};\nuse std::thread::sleep;\nuse std::time::Duration;\nuse tracy_client::"
},
{
"path": "make_sys.sh",
"chars": 4192,
"preview": "#!/usr/bin/env bash\n\n# NOTE: this script is only intended to be run on CI.\nset -xe\n\nexport PATH=\"$HOME/.cargo/bin/\":\"$PA"
},
{
"path": "tracing-tracy/Cargo.toml",
"chars": 1995,
"preview": "[package]\nname = \"tracing-tracy\"\nversion = \"0.11.4\"\nauthors = [\"Simonas Kazlauskas <tracing-tracy@kazlauskas.me>\"]\nlicen"
},
{
"path": "tracing-tracy/src/config.rs",
"chars": 3939,
"preview": "use client::Client;\nuse tracing_subscriber::fmt::format::DefaultFields;\nuse tracing_subscriber::fmt::FormatFields;\n\n/// "
},
{
"path": "tracing-tracy/src/lib.rs",
"chars": 15778,
"preview": "//! Collect [Tracy] profiles in tracing-enabled applications.\n//!\n//! Assuming the application is well instrumented, thi"
},
{
"path": "tracing-tracy/src/tests.rs",
"chars": 5437,
"preview": "use crate::{Config, DefaultConfig};\n\nuse super::TracyLayer;\nuse criterion::Criterion;\nuse futures::future::join_all;\nuse"
},
{
"path": "tracy-client/Cargo.toml",
"chars": 1903,
"preview": "[package]\nname = \"tracy-client\"\nversion = \"0.18.4\" # AUTO-BUMP\nauthors = [\"Simonas Kazlauskas <tracy-client@kazlauskas.m"
},
{
"path": "tracy-client/benches/client.rs",
"chars": 1708,
"preview": "use criterion::{criterion_group, criterion_main, Criterion};\nuse tracy_client::Client;\n\nfn client_start(c: &mut Criterio"
},
{
"path": "tracy-client/src/demangle.rs",
"chars": 5530,
"preview": "//! Custom symbol demangling support.\n//!\n//! By default, Tracy demangles symbols using the C++ ABI, which is not fully "
},
{
"path": "tracy-client/src/frame.rs",
"chars": 7144,
"preview": "use crate::Client;\n\n/// A non-continuous frame region.\n///\n/// Create with the [`Client::non_continuous_frame`] function"
},
{
"path": "tracy-client/src/gpu.rs",
"chars": 18935,
"preview": "use std::{\n convert::TryInto,\n sync::{Arc, Mutex},\n};\n\nuse crate::{Client, SpanLocation};\n\n#[repr(u8)]\n/// The API"
},
{
"path": "tracy-client/src/lib.rs",
"chars": 10621,
"preview": "#![deny(unsafe_op_in_unsafe_fn, missing_docs)]\n# macro.\n#[derive(Copy, C"
},
{
"path": "tracy-client/src/span.rs",
"chars": 9900,
"preview": "use crate::{adjust_stack_depth, Client};\nuse std::ffi::CString;\n\n/// A handle representing a span of execution.\n///\n/// "
},
{
"path": "tracy-client/src/state.rs",
"chars": 7523,
"preview": "use crate::Client;\n\n/// Client initialization and lifetime management.\nimpl Client {\n /// Start the client.\n ///\n "
},
{
"path": "tracy-client/tests/loom.rs",
"chars": 1901,
"preview": "#[cfg(loom)]\nmod loom {\n\n use loom::thread;\n use tracy_client::Client;\n\n fn model<F>(f: F)\n where\n F:"
},
{
"path": "tracy-client/tests/tests.rs",
"chars": 3985,
"preview": "use std::time::Duration;\n\nuse tracy_client::*;\n\n#[global_allocator]\nstatic GLOBAL: ProfiledAllocator<std::alloc::System>"
},
{
"path": "tracy-client-sys/Cargo.toml",
"chars": 1344,
"preview": "[package]\nname = \"tracy-client-sys\"\nversion = \"0.28.0\" # AUTO-BUMP\nauthors = [\"Simonas Kazlauskas <tracy-client-sys@kazl"
},
{
"path": "tracy-client-sys/build.rs",
"chars": 4980,
"preview": "use std::{env::VarError, io::Write};\n\nmacro_rules! docs_rs {\n () => {\n option_env!(\"DOCS_RS\") == Some(\"1\")\n "
},
{
"path": "tracy-client-sys/src/dbghelp.rs",
"chars": 7444,
"preview": "//! On Windows, both Tracy and Rust use the `dbghelp.dll` symbol helper to resolve symbols for stack traces.\n//! `dbghel"
},
{
"path": "tracy-client-sys/src/generated.rs",
"chars": 21591,
"preview": "pub const TracyPlotFormatEnum_TracyPlotFormatNumber: TracyPlotFormatEnum = 0;\npub const TracyPlotFormatEnum_TracyPlotFor"
},
{
"path": "tracy-client-sys/src/generated_fibers.rs",
"chars": 136,
"preview": "extern \"C\" {\n pub fn ___tracy_fiber_enter(fiber: *const ::std::os::raw::c_char);\n}\nextern \"C\" {\n pub fn ___tracy_f"
},
{
"path": "tracy-client-sys/src/generated_manual_lifetime.rs",
"chars": 111,
"preview": "extern \"C\" {\n pub fn ___tracy_startup_profiler();\n}\nextern \"C\" {\n pub fn ___tracy_shutdown_profiler();\n}\n"
},
{
"path": "tracy-client-sys/src/lib.rs",
"chars": 2262,
"preview": "//! The Tracy Client and its low level API\n//!\n//! This crate embeds the C++ Tracy client library and exposes its API. F"
},
{
"path": "tracy-client-sys/tests.rs",
"chars": 1167,
"preview": "#[cfg(all(feature = \"enable\", test))]\nmod tests {\n use tracy_client_sys::*;\n\n fn test_emit_zone() {\n unsafe"
},
{
"path": "tracy-client-sys/tracy/LICENSE",
"chars": 1618,
"preview": "Tracy Profiler (https://github.com/wolfpld/tracy) is licensed under the\n3-clause BSD license.\n\nCopyright (c) 2017-2025, "
},
{
"path": "tracy-client-sys/tracy/TracyClient.F90",
"chars": 69920,
"preview": "module tracy\n use, intrinsic :: iso_c_binding, only: c_ptr, c_loc, c_char, c_null_char, &\n & c_size_t, c_int8_t, c_i"
},
{
"path": "tracy-client-sys/tracy/TracyClient.cpp",
"chars": 1038,
"preview": "//\n// Tracy profiler\n// ----------------\n//\n// For fast integration, compile and\n// link with this sour"
},
{
"path": "tracy-client-sys/tracy/client/TracyAlloc.cpp",
"chars": 1055,
"preview": "#include \"../common/TracyAlloc.hpp\"\n\n#ifdef TRACY_USE_RPMALLOC\n\n#include <atomic>\n\n#include \"../common/TracyForceInline."
},
{
"path": "tracy-client-sys/tracy/client/TracyArmCpuTable.hpp",
"chars": 14543,
"preview": "namespace tracy\n{\n\n#if defined __linux__ && defined __ARM_ARCH\n\nstatic const char* DecodeArmImplementer( uint32_t v )\n{\n"
},
{
"path": "tracy-client-sys/tracy/client/TracyCallstack.cpp",
"chars": 42616,
"preview": "#include <limits>\n#include <new>\n#include <stdio.h>\n#include <string.h>\n#include \"TracyCallstack.hpp\"\n#include \"TracyDeb"
},
{
"path": "tracy-client-sys/tracy/client/TracyCallstack.h",
"chars": 926,
"preview": "#ifndef __TRACYCALLSTACK_H__\n#define __TRACYCALLSTACK_H__\n\n#ifndef TRACY_NO_CALLSTACK\n\n# if !defined _WIN32\n# includ"
},
{
"path": "tracy-client-sys/tracy/client/TracyCallstack.hpp",
"chars": 3702,
"preview": "#ifndef __TRACYCALLSTACK_HPP__\n#define __TRACYCALLSTACK_HPP__\n\n#include <stdint.h>\n\n#include \"../common/TracyApi.h\"\n#inc"
},
{
"path": "tracy-client-sys/tracy/client/TracyCpuid.hpp",
"chars": 435,
"preview": "#ifndef __TRACYCPUID_HPP__\n#define __TRACYCPUID_HPP__\n\n// Prior to GCC 11 the cpuid.h header did not have any include gu"
},
{
"path": "tracy-client-sys/tracy/client/TracyDebug.hpp",
"chars": 202,
"preview": "#ifndef __TRACYPRINT_HPP__\n#define __TRACYPRINT_HPP__\n\n#ifdef TRACY_VERBOSE\n# include <stdio.h>\n# define TracyDebug(.."
},
{
"path": "tracy-client-sys/tracy/client/TracyDxt1.cpp",
"chars": 32169,
"preview": "#include \"TracyDxt1.hpp\"\n#include \"../common/TracyForceInline.hpp\"\n\n#include <assert.h>\n#include <stdint.h>\n#include <st"
},
{
"path": "tracy-client-sys/tracy/client/TracyDxt1.hpp",
"chars": 151,
"preview": "#ifndef __TRACYDXT1_HPP__\n#define __TRACYDXT1_HPP__\n\nnamespace tracy\n{\n\nvoid CompressImageDxt1( const char* src, char* d"
},
{
"path": "tracy-client-sys/tracy/client/TracyFastVector.hpp",
"chars": 2673,
"preview": "#ifndef __TRACYFASTVECTOR_HPP__\n#define __TRACYFASTVECTOR_HPP__\n\n#include <assert.h>\n#include <stddef.h>\n\n#include \"../c"
},
{
"path": "tracy-client-sys/tracy/client/TracyKCore.cpp",
"chars": 2905,
"preview": "#ifdef __linux__\n\n#include <algorithm>\n#include <assert.h>\n#include <fcntl.h>\n#include <limits.h>\n#include <unistd.h>\n\n#"
},
{
"path": "tracy-client-sys/tracy/client/TracyKCore.hpp",
"chars": 437,
"preview": "#ifndef __TRACYKCORE_HPP__\n#define __TRACYKCORE_HPP__\n\n#ifdef __linux__\n\n#include <stdint.h>\n\n#include \"TracyFastVector."
},
{
"path": "tracy-client-sys/tracy/client/TracyLock.hpp",
"chars": 17132,
"preview": "#ifndef __TRACYLOCK_HPP__\n#define __TRACYLOCK_HPP__\n\n#include <atomic>\n#include <limits>\n\n#include \"../common/TracySyste"
},
{
"path": "tracy-client-sys/tracy/client/TracyOverride.cpp",
"chars": 509,
"preview": "#ifdef TRACY_ENABLE\n# ifdef __linux__\n# include \"TracyDebug.hpp\"\n# ifdef TRACY_VERBOSE\n# include <dlfcn.h>\n#"
},
{
"path": "tracy-client-sys/tracy/client/TracyProfiler.cpp",
"chars": 173360,
"preview": "#ifdef TRACY_ENABLE\n\n#ifdef _WIN32\n# ifndef NOMINMAX\n# define NOMINMAX\n# endif\n# include <winsock2.h>\n# include <"
},
{
"path": "tracy-client-sys/tracy/client/TracyProfiler.hpp",
"chars": 36581,
"preview": "#ifndef __TRACYPROFILER_HPP__\n#define __TRACYPROFILER_HPP__\n\n#include <assert.h>\n#include <atomic>\n#include <stdint.h>\n#"
},
{
"path": "tracy-client-sys/tracy/client/TracyRingBuffer.hpp",
"chars": 3598,
"preview": "#include <atomic>\n#include <assert.h>\n#include <errno.h>\n#include <linux/perf_event.h>\n#include <stdint.h>\n#include <str"
},
{
"path": "tracy-client-sys/tracy/client/TracyRocprof.cpp",
"chars": 24016,
"preview": "#include \"../server/tracy_robin_hood.h\"\n#include \"TracyProfiler.hpp\"\n#include \"TracyThread.hpp\"\n#include \"tracy/TracyC.h"
},
{
"path": "tracy-client-sys/tracy/client/TracyScoped.hpp",
"chars": 7154,
"preview": "#ifndef __TRACYSCOPED_HPP__\n#define __TRACYSCOPED_HPP__\n\n#include <limits>\n#include <stdarg.h>\n#include <stdint.h>\n#incl"
},
{
"path": "tracy-client-sys/tracy/client/TracyStringHelpers.hpp",
"chars": 837,
"preview": "#ifndef __TRACYSTRINGHELPERS_HPP__\n#define __TRACYSTRINGHELPERS_HPP__\n\n#include <assert.h>\n#include <string.h>\n\n#include"
},
{
"path": "tracy-client-sys/tracy/client/TracySysPower.cpp",
"chars": 4748,
"preview": "#include \"TracySysPower.hpp\"\n\n#ifdef TRACY_HAS_SYSPOWER\n\n#include <sys/types.h>\n#include <dirent.h>\n#include <chrono>\n#i"
},
{
"path": "tracy-client-sys/tracy/client/TracySysPower.hpp",
"chars": 592,
"preview": "#ifndef __TRACYSYSPOWER_HPP__\n#define __TRACYSYSPOWER_HPP__\n\n#if defined __linux__\n# define TRACY_HAS_SYSPOWER\n#endif\n\n"
},
{
"path": "tracy-client-sys/tracy/client/TracySysTime.cpp",
"chars": 2643,
"preview": "#include \"TracySysTime.hpp\"\n\n#ifdef TRACY_HAS_SYSTIME\n\n# if defined _WIN32\n# include <windows.h>\n# include \"../co"
},
{
"path": "tracy-client-sys/tracy/client/TracySysTime.hpp",
"chars": 435,
"preview": "#ifndef __TRACYSYSTIME_HPP__\n#define __TRACYSYSTIME_HPP__\n\n#if defined _WIN32 || defined __linux__ || defined __APPLE__\n"
},
{
"path": "tracy-client-sys/tracy/client/TracySysTrace.cpp",
"chars": 59208,
"preview": "#include \"TracyDebug.hpp\"\n#include \"TracyStringHelpers.hpp\"\n#include \"TracySysTrace.hpp\"\n#include \"../common/TracySystem"
},
{
"path": "tracy-client-sys/tracy/client/TracySysTrace.hpp",
"chars": 563,
"preview": "#ifndef __TRACYSYSTRACE_HPP__\n#define __TRACYSYSTRACE_HPP__\n\n#if !defined TRACY_NO_SYSTEM_TRACING && ( defined _WIN32 ||"
},
{
"path": "tracy-client-sys/tracy/client/TracyThread.hpp",
"chars": 1579,
"preview": "#ifndef __TRACYTHREAD_HPP__\n#define __TRACYTHREAD_HPP__\n\n#if defined _WIN32\n# include <windows.h>\n#else\n# include <pth"
},
{
"path": "tracy-client-sys/tracy/client/tracy_SPSCQueue.h",
"chars": 4954,
"preview": "/*\nCopyright (c) 2020 Erik Rigtorp <erik@rigtorp.se>\n\nPermission is hereby granted, free of charge, to any person obtain"
},
{
"path": "tracy-client-sys/tracy/client/tracy_concurrentqueue.h",
"chars": 54118,
"preview": "// Provides a C++11 implementation of a multi-producer, multi-consumer lock-free queue.\n// An overview, including bench"
},
{
"path": "tracy-client-sys/tracy/client/tracy_rpmalloc.cpp",
"chars": 125899,
"preview": "#ifdef TRACY_ENABLE\n\n/* rpmalloc.c - Memory allocator - Public Domain - 2016-2020 Mattias Jansson\n *\n * This libra"
},
{
"path": "tracy-client-sys/tracy/client/tracy_rpmalloc.hpp",
"chars": 17850,
"preview": "/* rpmalloc.h - Memory allocator - Public Domain - 2016 Mattias Jansson\n *\n * This library provides a cross-platfo"
},
{
"path": "tracy-client-sys/tracy/common/TracyAlign.hpp",
"chars": 394,
"preview": "#ifndef __TRACYALIGN_HPP__\n#define __TRACYALIGN_HPP__\n\n#include <string.h>\n\n#include \"TracyForceInline.hpp\"\n\nnamespace t"
},
{
"path": "tracy-client-sys/tracy/common/TracyAlloc.hpp",
"chars": 1186,
"preview": "#ifndef __TRACYALLOC_HPP__\n#define __TRACYALLOC_HPP__\n\n#include <stdlib.h>\n\n#if defined TRACY_ENABLE && !defined __EMSCR"
},
{
"path": "tracy-client-sys/tracy/common/TracyApi.h",
"chars": 352,
"preview": "#ifndef __TRACYAPI_H__\n#define __TRACYAPI_H__\n\n#if defined _WIN32\n# if defined TRACY_EXPORTS\n# define TRACY_API __de"
},
{
"path": "tracy-client-sys/tracy/common/TracyColor.hpp",
"chars": 17206,
"preview": "#ifndef __TRACYCOLOR_HPP__\n#define __TRACYCOLOR_HPP__\n\nnamespace tracy\n{\nstruct Color\n{\nenum ColorType\n{\n Snow = 0xff"
},
{
"path": "tracy-client-sys/tracy/common/TracyForceInline.hpp",
"chars": 465,
"preview": "#ifndef __TRACYFORCEINLINE_HPP__\n#define __TRACYFORCEINLINE_HPP__\n\n#if defined(__GNUC__)\n# define tracy_force_inline __"
},
{
"path": "tracy-client-sys/tracy/common/TracyMutex.hpp",
"chars": 255,
"preview": "#ifndef __TRACYMUTEX_HPP__\n#define __TRACYMUTEX_HPP__\n\n#if defined _MSC_VER\n\n# include <shared_mutex>\n\nnamespace tracy\n"
},
{
"path": "tracy-client-sys/tracy/common/TracyProtocol.hpp",
"chars": 3855,
"preview": "#ifndef __TRACYPROTOCOL_HPP__\n#define __TRACYPROTOCOL_HPP__\n\n#include <limits>\n#include <stdint.h>\n\nnamespace tracy\n{\n\nc"
},
{
"path": "tracy-client-sys/tracy/common/TracyQueue.hpp",
"chars": 23476,
"preview": "#ifndef __TRACYQUEUE_HPP__\n#define __TRACYQUEUE_HPP__\n\n#include <stddef.h>\n#include <stdint.h>\n\nnamespace tracy\n{\n\nenum "
},
{
"path": "tracy-client-sys/tracy/common/TracySocket.cpp",
"chars": 16954,
"preview": "#include <assert.h>\n#include <inttypes.h>\n#include <new>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#inc"
},
{
"path": "tracy-client-sys/tracy/common/TracySocket.hpp",
"chars": 3236,
"preview": "#ifndef __TRACYSOCKET_HPP__\n#define __TRACYSOCKET_HPP__\n\n#include <atomic>\n#include <stddef.h>\n#include <stdint.h>\n\nstru"
},
{
"path": "tracy-client-sys/tracy/common/TracyStackFrames.cpp",
"chars": 4471,
"preview": "#include \"TracyStackFrames.hpp\"\n\nnamespace tracy\n{\n\nconst char* s_tracyStackFrames_[] = {\n \"tracy::Callstack\",\n \"t"
},
{
"path": "tracy-client-sys/tracy/common/TracyStackFrames.hpp",
"chars": 322,
"preview": "#ifndef __TRACYSTACKFRAMES_HPP__\n#define __TRACYSTACKFRAMES_HPP__\n\n#include <stddef.h>\n\nnamespace tracy\n{\n\nstruct String"
},
{
"path": "tracy-client-sys/tracy/common/TracySystem.cpp",
"chars": 9067,
"preview": "#ifdef _MSC_VER\n# pragma warning(disable:4996)\n#endif\n#if defined _WIN32\n# ifndef WIN32_LEAN_AND_MEAN\n# define WIN3"
},
{
"path": "tracy-client-sys/tracy/common/TracySystem.hpp",
"chars": 754,
"preview": "#ifndef __TRACYSYSTEM_HPP__\n#define __TRACYSYSTEM_HPP__\n\n#include <stdint.h>\n\n#include \"TracyApi.h\"\n\nnamespace tracy\n{\n\n"
},
{
"path": "tracy-client-sys/tracy/common/TracyVersion.hpp",
"chars": 170,
"preview": "#ifndef __TRACYVERSION_HPP__\n#define __TRACYVERSION_HPP__\n\nnamespace tracy\n{\nnamespace Version\n{\nenum { Major = 0 };\nenu"
},
{
"path": "tracy-client-sys/tracy/common/TracyWinFamily.hpp",
"chars": 392,
"preview": "#ifndef __TRACYWINFAMILY_HPP__\n#define __TRACYWINFAMILY_HPP__\n\n#ifdef _WIN32\n# include <winapifamily.h>\n# if !WINAPI_F"
},
{
"path": "tracy-client-sys/tracy/common/TracyYield.hpp",
"chars": 512,
"preview": "#ifndef __TRACYYIELD_HPP__\n#define __TRACYYIELD_HPP__\n\n#if defined __SSE2__ || defined _M_AMD64 || (defined _M_IX86_FP &"
},
{
"path": "tracy-client-sys/tracy/common/tracy_lz4.cpp",
"chars": 113400,
"preview": "/*\n LZ4 - Fast LZ compression algorithm\n Copyright (C) 2011-2020, Yann Collet.\n\n BSD 2-Clause License (http://www."
},
{
"path": "tracy-client-sys/tracy/common/tracy_lz4.hpp",
"chars": 43279,
"preview": "/*\n * LZ4 - Fast LZ compression algorithm\n * Header File\n * Copyright (C) 2011-2020, Yann Collet.\n\n BSD 2-Clause Li"
},
{
"path": "tracy-client-sys/tracy/common/tracy_lz4hc.cpp",
"chars": 70167,
"preview": "/*\n LZ4 HC - High Compression Mode of LZ4\n Copyright (C) 2011-2020, Yann Collet.\n\n BSD 2-Clause License (http:/"
},
{
"path": "tracy-client-sys/tracy/common/tracy_lz4hc.hpp",
"chars": 20095,
"preview": "/*\n LZ4 HC - High Compression Mode of LZ4\n Header File\n Copyright (C) 2011-2020, Yann Collet.\n BSD 2-Clause Lice"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/LICENSE",
"chars": 1478,
"preview": "# Copyright (C) 2012-2016 Free Software Foundation, Inc.\n\n# Redistribution and use in source and binary forms, with or w"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/alloc.cpp",
"chars": 4538,
"preview": "/* alloc.c -- Memory allocation without mmap.\n Copyright (C) 2012-2021 Free Software Foundation, Inc.\n Written by Ia"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/backtrace.hpp",
"chars": 8731,
"preview": "/* backtrace.h -- Public header file for stack backtrace library.\n Copyright (C) 2012-2021 Free Software Foundation, I"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/config.h",
"chars": 598,
"preview": "#include <limits.h>\n#if defined(__linux__) && !defined(__GLIBC__) && !defined(__WORDSIZE)\n// include __WORDSIZE headers "
},
{
"path": "tracy-client-sys/tracy/libbacktrace/dwarf.cpp",
"chars": 118808,
"preview": "/* dwarf.c -- Get file/line information from DWARF for backtraces.\n Copyright (C) 2012-2021 Free Software Foundation, "
},
{
"path": "tracy-client-sys/tracy/libbacktrace/elf.cpp",
"chars": 196661,
"preview": "/* elf.c -- Get debug data from an ELF file for backtraces.\n Copyright (C) 2012-2021 Free Software Foundation, Inc.\n "
},
{
"path": "tracy-client-sys/tracy/libbacktrace/fileline.cpp",
"chars": 10237,
"preview": "/* fileline.c -- Get file and line number information in a backtrace.\n Copyright (C) 2012-2021 Free Software Foundatio"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/filenames.hpp",
"chars": 2149,
"preview": "/* btest.c -- Filename header for libbacktrace library\n Copyright (C) 2012-2018 Free Software Foundation, Inc.\n Writ"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/internal.hpp",
"chars": 14112,
"preview": "/* internal.h -- Internal header file for stack backtrace library.\n Copyright (C) 2012-2021 Free Software Foundation, "
},
{
"path": "tracy-client-sys/tracy/libbacktrace/macho.cpp",
"chars": 36507,
"preview": "/* elf.c -- Get debug data from a Mach-O file for backtraces.\n Copyright (C) 2020-2021 Free Software Foundation, Inc.\n"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/mmapio.cpp",
"chars": 3185,
"preview": "/* mmapio.c -- File views using mmap.\n Copyright (C) 2012-2021 Free Software Foundation, Inc.\n Written by Ian Lance "
},
{
"path": "tracy-client-sys/tracy/libbacktrace/posix.cpp",
"chars": 3169,
"preview": "/* posix.c -- POSIX file I/O routines for the backtrace library.\n Copyright (C) 2012-2021 Free Software Foundation, In"
},
{
"path": "tracy-client-sys/tracy/libbacktrace/sort.cpp",
"chars": 3201,
"preview": "/* sort.c -- Sort without allocating memory\n Copyright (C) 2012-2021 Free Software Foundation, Inc.\n Written by Ian "
},
{
"path": "tracy-client-sys/tracy/libbacktrace/state.cpp",
"chars": 2426,
"preview": "/* state.c -- Create the backtrace state.\n Copyright (C) 2012-2021 Free Software Foundation, Inc.\n Written by Ian La"
},
{
"path": "tracy-client-sys/tracy/tracy/Tracy.hpp",
"chars": 15041,
"preview": "#ifndef __TRACY_HPP__\n#define __TRACY_HPP__\n\n#include \"../common/TracyColor.hpp\"\n#include \"../common/TracySystem.hpp\"\n\n#"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyC.h",
"chars": 19343,
"preview": "#ifndef __TRACYC_HPP__\n#define __TRACYC_HPP__\n\n#include <stddef.h>\n#include <stdint.h>\n\n#include \"../common/TracyApi.h\"\n"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyCUDA.hpp",
"chars": 57724,
"preview": "#ifndef __TRACYCUDA_HPP__\n#define __TRACYCUDA_HPP__\n\n#ifndef TRACY_ENABLE\n\n#define TracyCUDAContext() nullptr\n#define Tr"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyD3D11.hpp",
"chars": 17800,
"preview": "#ifndef __TRACYD3D11_HPP__\n#define __TRACYD3D11_HPP__\n\n#ifndef TRACY_ENABLE\n\n#define TracyD3D11Context(device,queue) nul"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyD3D12.hpp",
"chars": 21566,
"preview": "#ifndef __TRACYD3D12_HPP__\n#define __TRACYD3D12_HPP__\n\n#ifndef TRACY_ENABLE\n\n#define TracyD3D12Context(device, queue) nu"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyLua.hpp",
"chars": 14548,
"preview": "#ifndef __TRACYLUA_HPP__\n#define __TRACYLUA_HPP__\n\n// Include this file after you include lua headers.\n\n#ifndef TRACY_EN"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyMetal.hmm",
"chars": 26586,
"preview": "#ifndef __TRACYMETAL_HMM__\n#define __TRACYMETAL_HMM__\n\n/* This file implements a Metal API back-end for Tracy (it has on"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyOpenCL.hpp",
"chars": 18606,
"preview": "#ifndef __TRACYOPENCL_HPP__\n#define __TRACYOPENCL_HPP__\n\n#if !defined TRACY_ENABLE\n\n#define TracyCLContext(c, x) nullptr"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyOpenGL.hpp",
"chars": 13416,
"preview": "#ifndef __TRACYOPENGL_HPP__\n#define __TRACYOPENGL_HPP__\n\n#if !defined TRACY_ENABLE || defined __APPLE__\n\n#define TracyGp"
},
{
"path": "tracy-client-sys/tracy/tracy/TracyVulkan.hpp",
"chars": 31673,
"preview": "#ifndef __TRACYVULKAN_HPP__\n#define __TRACYVULKAN_HPP__\n\n#if !defined TRACY_ENABLE\n\n#define TracyVkContext(x,y,z,w) null"
}
]
About this extraction
This page contains the full source code of the nagisa/rust_tracy_client GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 121 files (1.8 MB), approximately 523.7k tokens, and a symbol index with 1824 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.