mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
tracy: support naming threads
This commit is contained in:
@ -187,6 +187,11 @@ const Impl = struct {
|
|||||||
return .{};
|
return .{};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Name the current thread.
|
||||||
|
pub inline fn setThreadName(comptime name: [:0]const u8) void {
|
||||||
|
c.___tracy_set_thread_name(name.ptr);
|
||||||
|
}
|
||||||
|
|
||||||
inline fn alloc(ptr: [*]u8, len: usize) void {
|
inline fn alloc(ptr: [*]u8, len: usize) void {
|
||||||
if (has_callstack_support) {
|
if (has_callstack_support) {
|
||||||
c.___tracy_emit_memory_alloc_callstack(ptr, len, callstack_depth, 0);
|
c.___tracy_emit_memory_alloc_callstack(ptr, len, callstack_depth, 0);
|
||||||
@ -245,6 +250,10 @@ const Noop = struct {
|
|||||||
pub inline fn frame(comptime name: [:0]const u8) Frame(name) {
|
pub inline fn frame(comptime name: [:0]const u8) Frame(name) {
|
||||||
return .{};
|
return .{};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub inline fn setThreadName(comptime name: [:0]const u8) void {
|
||||||
|
_ = name;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
test {}
|
test {}
|
||||||
|
Reference in New Issue
Block a user