8000 GitHub - johan0A/zig-tracy
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

johan0A/zig-tracy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zig-tracy

Library for instrumentating zig code for Tracy 0.11.1.

how to use

  1. Add tracy to the dependency list in build.zig.zon:
zig fetch --save git+https://github.com/johan0A/zig-tracy
  1. Config build.zig:
...
const tracy = b.dependency("tracy", .{
    .enable_tracing = b.option(bool, "enable_tracing", "Enable Tracy profile markers") orelse false,
    .enable_fibers = b.option(bool, "enable_fibers", "Enable Tracy fiber support") orelse false,
    .on_demand = b.option(bool, "on_demand", "Build tracy with TRACY_ON_DEMAND") orelse false,
    .callstack_support = b.option(bool, "callstack_support", "Builds tracy with TRACY_USE_CALLSTACK") orelse false,
    .default_callstack_depth = b.option(u32, "default_callstack_depth", "sets TRACY_CALLSTACK to the depth provided") orelse 0,
});
root_module.addImport("tracy", tracy.module("tracy"));
...
  1. Add markers to your code:
fn baz() void {
    const zone = tracy.zone(@src());
    defer zone.end();
    foo();
    bar();
}

see more in depth example in the example folder.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0