From c5217d1f8756d1b4187563cfd2de235862fe7b32 Mon Sep 17 00:00:00 2001 From: yongyuan Date: Fri, 22 Mar 2024 17:11:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E5=90=88hitrace=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yongyuan --- src/threadpool.c | 6 +++--- src/unix/ohos/trace_ohos.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/threadpool.c b/src/threadpool.c index 57e3ace..534994f 100644 --- a/src/threadpool.c +++ b/src/threadpool.c @@ -658,7 +658,7 @@ void uv__work_done(uv_async_t* handle) { QUEUE* q; QUEUE wq; int err; - char trac_name[25] = "TaskNumber_"; + char trace_name[25] = "TaskNumber_"; char str[10]; loop = container_of(handle, uv_loop_t, wq_async); @@ -685,9 +685,9 @@ void uv__work_done(uv_async_t* handle) { UV_LOGW("The number of task is too much, task number is %{public}d", loop->active_reqs.count); } snprintf(str, sizeof(str), "%d", loop->active_reqs.count); - strcat(trac_name, str); + strcat(trace_name, str); - uv_start_trace(UV_TRACE_TAG, trac_name); + uv_start_trace(UV_TRACE_TAG, trace_name); while (!QUEUE_EMPTY(&wq)) { q = QUEUE_HEAD(&wq); QUEUE_REMOVE(q); diff --git a/src/unix/ohos/trace_ohos.c b/src/unix/ohos/trace_ohos.c index 860b394..ba855ba 100644 --- a/src/unix/ohos/trace_ohos.c +++ b/src/unix/ohos/trace_ohos.c @@ -22,9 +22,9 @@ #include "hitrace_meter_c.h" void uv_start_trace(uint64_t tag, const char* name) { - OH_HiTrace_StartTrace_C(tag, name); + HiTraceStartTrace(tag, name); } void uv_end_trace(uint64_t tag) { - OH_HiTrace_FinishTrace_C(tag); + HiTraceFinishTrace(tag); } \ No newline at end of file -- Gitee