From cef5a1a02e8a9162c7ce98abe1cf32e7c4611592 Mon Sep 17 00:00:00 2001 From: huanglihao Date: Mon, 8 Sep 2025 08:16:57 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/performance/perfmonitor/common/perf_trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/performance/perfmonitor/common/perf_trace.h b/plugins/performance/perfmonitor/common/perf_trace.h index ff830599e..f94c8cd52 100644 --- a/plugins/performance/perfmonitor/common/perf_trace.h +++ b/plugins/performance/perfmonitor/common/perf_trace.h @@ -23,7 +23,7 @@ namespace OHOS { namespace HiviewDFX { -constexpr int TRACE_BUF_LEN = 128; +constexpr int TRACE_BUF_LEN = 256; void XperfStartTrace(const char *fmt, ...) __attribute__((format(printf, 1, 2))); void FormatTraceName(char *name, size_t size, const char *fmt, ...) __attribute__((format(printf, 3, 4))); -- Gitee From 3a3c05faf1297c8326923d529a4115cb9a9390a6 Mon Sep 17 00:00:00 2001 From: huanglihao Date: Sat, 6 Sep 2025 07:32:22 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/event_builder/xperf_event_builder.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/performance/perfmonitor/common/event_builder/xperf_event_builder.cpp b/plugins/performance/perfmonitor/common/event_builder/xperf_event_builder.cpp index c88215c1c..c684c194b 100644 --- a/plugins/performance/perfmonitor/common/event_builder/xperf_event_builder.cpp +++ b/plugins/performance/perfmonitor/common/event_builder/xperf_event_builder.cpp @@ -187,9 +187,13 @@ XperfEventBuilder& XperfEventBuilder::Param(const char* name, const std::vector< { HiSysEventParam param = { .t = HISYSEVENT_UINT16_ARRAY, - .v = { .array = static_cast(const_cast(value.data())) }, - .arraySize = value.size(), + .v = { .array = nullptr }, + .arraySize = 0, }; + if (!value.empty()) { + param.v.array = static_cast(const_cast(value.data())); + param.arraySize = value.size(); + } SetParamName(param, name); paramList.push_back(param); return *this; -- Gitee