From cff94171762da7a0231a4c49ab64a7e8cee1bca9 Mon Sep 17 00:00:00 2001 From: wanchao21 Date: Fri, 12 Sep 2025 07:30:12 +0000 Subject: [PATCH 1/3] update frameworks/native/appkit/app/main_thread.cpp. Signed-off-by: wanchao21 --- frameworks/native/appkit/app/main_thread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frameworks/native/appkit/app/main_thread.cpp b/frameworks/native/appkit/app/main_thread.cpp index 62675863f81..b08dac42f67 100644 --- a/frameworks/native/appkit/app/main_thread.cpp +++ b/frameworks/native/appkit/app/main_thread.cpp @@ -3576,7 +3576,11 @@ int32_t MainThread::ScheduleNotifyAppFault(const FaultData &faultData) #ifdef SUPPORT_HIPERF if (faultData.faultType == FaultDataType::CPU_LOAD) { + ffrt::submit([faultData]() { + AppExecFwk::AppCapturePerf::GetInstance().CapturePerf(faultData); + }, "xxx"); return AppExecFwk::AppCapturePerf::GetInstance().CapturePerf(faultData); + return NO_ERROR; } #endif -- Gitee From 8d1d81590a184947e2c275defa83c89ac84aa886 Mon Sep 17 00:00:00 2001 From: wanchao21 Date: Fri, 12 Sep 2025 07:46:54 +0000 Subject: [PATCH 2/3] update frameworks/native/appkit/app/main_thread.cpp. Signed-off-by: wanchao21 --- frameworks/native/appkit/app/main_thread.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frameworks/native/appkit/app/main_thread.cpp b/frameworks/native/appkit/app/main_thread.cpp index b08dac42f67..1136b33f06c 100644 --- a/frameworks/native/appkit/app/main_thread.cpp +++ b/frameworks/native/appkit/app/main_thread.cpp @@ -3576,10 +3576,9 @@ int32_t MainThread::ScheduleNotifyAppFault(const FaultData &faultData) #ifdef SUPPORT_HIPERF if (faultData.faultType == FaultDataType::CPU_LOAD) { - ffrt::submit([faultData]() { + ffrt::submit([faultData] { AppExecFwk::AppCapturePerf::GetInstance().CapturePerf(faultData); - }, "xxx"); - return AppExecFwk::AppCapturePerf::GetInstance().CapturePerf(faultData); + }); return NO_ERROR; } #endif -- Gitee From 34c852649198e088f5b12e7436dfd4af286b0a96 Mon Sep 17 00:00:00 2001 From: wanchao21 Date: Fri, 12 Sep 2025 07:48:41 +0000 Subject: [PATCH 3/3] update test/unittest/dfr_test/appcapture_perf_test/appcapture_perf_test.cpp. Signed-off-by: wanchao21 --- .../appcapture_perf_test.cpp | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/test/unittest/dfr_test/appcapture_perf_test/appcapture_perf_test.cpp b/test/unittest/dfr_test/appcapture_perf_test/appcapture_perf_test.cpp index 353cd60a6bb..6ba05352052 100644 --- a/test/unittest/dfr_test/appcapture_perf_test/appcapture_perf_test.cpp +++ b/test/unittest/dfr_test/appcapture_perf_test/appcapture_perf_test.cpp @@ -135,26 +135,6 @@ HWTEST_F(AppCapturePerfTest, AppCapturePerfTest006, TestSize.Level0) EXPECT_EQ(result[1], "banana"); EXPECT_EQ(result[2], "cherry"); } - -/** - * @tc.name: ScheduleNotifyAppFault_0101 - * @tc.desc: Schedule notify app Fault. - * @tc.type: FUNC - * @tc.require: issueI79RY8 - */ -HWTEST_F(AppCapturePerfTest, ScheduleNotifyAppFault_0101, TestSize.Level1) -{ - FaultData faultData; - faultData.faultType = FaultDataType::CPU_LOAD; - faultData.errorObject.message = "msgContent"; - faultData.errorObject.stack = "stack"; - faultData.errorObject.name = "eventType"; - const std::shared_ptr runner; - const sptr thread; - mainThread_->mainHandler_ = std::make_shared(runner, thread); - auto ret = mainThread_->ScheduleNotifyAppFault(faultData); - EXPECT_EQ(ret, -1); -} /** * @tc.name: ScheduleNotifyAppFault_0102 -- Gitee