Pthread category region (#102)

* Perfetto args support for pthread functions

* Add pthread category
This commit is contained in:
Jonathan R. Madsen
2022-07-22 16:45:35 -05:00
committed by GitHub
parent 45acadf756
commit 0729e1737b
6 changed files with 210 additions and 53 deletions
@@ -26,6 +26,7 @@
#include "library/config.hpp"
#include "library/cpu_freq.hpp"
#include "library/debug.hpp"
#include "library/runtime.hpp"
#include <memory>
#include <vector>
@@ -73,7 +74,8 @@ get_sampler_is_sampling()
void
sampler::poll(std::atomic<State>* _state, nsec_t _interval, promise_t* _ready)
{
set_thread_state(ThreadState::Internal);
OMNITRACE_SCOPED_THREAD_STATE(ThreadState::Internal);
threading::set_thread_name("omni.sampler");
// notify thread started