buffer wrap-thread startup fix
Change-Id: I857cff63d28dcc068eddbd3ae2bc0193c428ec41
This commit is contained in:
@@ -1198,8 +1198,6 @@ PUBLIC_API roctracer_status_t roctracer_set_properties(
|
||||
API_METHOD_PREFIX
|
||||
switch (domain) {
|
||||
case ACTIVITY_DOMAIN_HSA_OPS: {
|
||||
roctracer::trace_buffer.StartWorkerThread();
|
||||
|
||||
// HSA OPS properties
|
||||
roctracer::hsa_ops_properties_t* ops_properties = reinterpret_cast<roctracer::hsa_ops_properties_t*>(properties);
|
||||
HsaApiTable* table = reinterpret_cast<HsaApiTable*>(ops_properties->table);
|
||||
|
||||
@@ -231,7 +231,7 @@ class TraceBuffer : protected TraceBufferBase {
|
||||
|
||||
void wrap_buffer(const pointer_t pointer) {
|
||||
std::lock_guard<mutex_t> lck(mutex_);
|
||||
if (work_thread_started_ == false) FATAL("worker thread is not started");
|
||||
if (work_thread_started_ == false) StartWorkerThread();
|
||||
|
||||
PTHREAD_CALL(pthread_mutex_lock(&work_mutex_));
|
||||
if (pointer >= end_pointer_) {
|
||||
|
||||
Reference in New Issue
Block a user