-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a header to be able to use a frame profiler in cubeb
The purpose of this header is to be swapped by cubeb users to use any number of frame profiler (tracy/Gecko Profiler/trace_event.h, etc.).
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright © 2022 Mozilla Foundation | ||
* | ||
* This program is made available under an ISC-style license. See the | ||
* accompanying file LICENSE for details. | ||
*/ | ||
|
||
#ifndef CUBEB_TRACING_H | ||
#define CUBEB_TRACING_H | ||
|
||
/* Empty header to allow hooking up a frame profiler. */ | ||
|
||
// To be called once on a thread to register for tracing. | ||
#define CUBEB_REGISTER_THREAD(name) | ||
// To be called once before a registered threads exits. | ||
#define CUBEB_UNREGISTER_THREAD() | ||
// Insert a tracing marker, with a particular name. | ||
// Phase can be 'x': instant marker, start time but no duration | ||
// 'b': beginning of a marker with a duration | ||
// 'e': end of a marker with a duration | ||
#define CUBEB_TRACE(name, phase) | ||
|
||
#endif // CUBEB_TRACING_H |