SWDEV-295522: Fixing Performance Issue
Removing DEBUG_TRACES and the unnecessary use of roctracer_op_string, made the MS app reporting 78 to 81 stable samples per second, depending on the type of the trace, while the main app without rocprof reports 100 to 106. More detailed numbers will be posted in the ticket. Change-Id: Ifbc529278cea54dd23e6086aa9b9ea2df952d5dd
Cette révision appartient à :
1 Parent
dc8717a6b5
révision
e4569c41fe
3 fichiers modifiés
+13
-16
Aucun fichier ne correspond à votre recherche
@@ -409,12 +409,12 @@ void* HIP_SyncApiDataCallback(uint32_t op_id, roctracer_record_t* record, const
|
||||
correlation_id_tls = 0;
|
||||
}
|
||||
|
||||
const char* name = roctracer_op_string(ACTIVITY_DOMAIN_HIP_API, op_id, 0);
|
||||
DEBUG_TRACE(
|
||||
"HIP_SyncApiDataCallback(\"%s\") phase(%d): op(%u) record(%p) data(%p) pool(%p) depth(%d) "
|
||||
"correlation_id(%lu) time_ns(%lu)\n",
|
||||
name, phase, op_id, record, data, pool, (int)(record_pair_stack->size()),
|
||||
(data_ptr) ? data_ptr->correlation_id : 0, timer.timestamp_ns());
|
||||
roctracer_op_string(ACTIVITY_DOMAIN_HIP_API, op_id, 0), phase, op_id, record, data, pool,
|
||||
(int)(record_pair_stack->size()), (data_ptr) ? data_ptr->correlation_id : 0,
|
||||
timer.timestamp_ns());
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -503,12 +503,11 @@ void* HIP_SyncActivityCallback(uint32_t op_id, roctracer_record_t* record,
|
||||
correlation_id_tls = 0;
|
||||
}
|
||||
|
||||
const char* name = roctracer_op_string(ACTIVITY_DOMAIN_HIP_API, op_id, 0);
|
||||
DEBUG_TRACE(
|
||||
"HIP_SyncActivityCallback(\"%s\") phase(%d): op(%u) record(%p) data(%p) pool(%p) depth(%d) "
|
||||
"correlation_id(%lu) beg_ns(%lu) end_ns(%lu)\n",
|
||||
name, phase, op_id, record, data, pool, (int)(record_pair_stack->size()),
|
||||
(data_ptr) ? data_ptr->correlation_id : 0, timestamp_ns);
|
||||
roctracer_op_string(ACTIVITY_DOMAIN_HIP_API, op_id, 0), phase, op_id, record, data, pool,
|
||||
(int)(record_pair_stack->size()), (data_ptr) ? data_ptr->correlation_id : 0, timestamp_ns);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -525,11 +524,11 @@ void HIP_AsyncActivityCallback(uint32_t op_id, void* record, void* arg) {
|
||||
if (record_ptr->correlation_id == 0) return;
|
||||
pool->Write(*record_ptr);
|
||||
|
||||
const char* name = roctracer_op_string(ACTIVITY_DOMAIN_HIP_OPS, record_ptr->op, record_ptr->kind);
|
||||
DEBUG_TRACE(
|
||||
"HIP_AsyncActivityCallback(\"%s\"): op(%u) kind(%u) record(%p) pool(%p) correlation_id(%d) "
|
||||
"beg_ns(%lu) end_ns(%lu)\n",
|
||||
name, record_ptr->op, record_ptr->kind, record, pool, record_ptr->correlation_id,
|
||||
roctracer_op_string(ACTIVITY_DOMAIN_HIP_OPS, record_ptr->op, record_ptr->kind),
|
||||
record_ptr->op, record_ptr->kind, record, pool, record_ptr->correlation_id,
|
||||
record_ptr->begin_ns, record_ptr->end_ns);
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ inline static void DEBUG_TRACE(const char* fmt, ...) {
|
||||
va_end(valist);
|
||||
}
|
||||
#else
|
||||
inline static void DEBUG_TRACE(const char* fmt, ...) {}
|
||||
#define DEBUG_TRACE(...)
|
||||
#endif
|
||||
|
||||
#endif // SRC_UTIL_LOGGER_H_
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur