Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7ec04c9

Browse files
authored
Suppress in-actionable warnings in the iOS profiler. (#52227)
This is a benign log that is not actionable to the end user. The profiler checker for this and tries again anyway. Fixes flutter/flutter#116193
1 parent eb027b8 commit 7ec04c9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
MachThreads() = default;
2424

2525
~MachThreads() {
26-
kern_return_t kernel_return_code = vm_deallocate(
26+
[[maybe_unused]] kern_return_t kernel_return_code = vm_deallocate(
2727
mach_task_self(), reinterpret_cast<vm_offset_t>(threads), thread_count * sizeof(thread_t));
28-
FML_CHECK(kernel_return_code == KERN_SUCCESS) << "Failed to deallocate thread infos.";
28+
FML_DCHECK(kernel_return_code == KERN_SUCCESS) << "Failed to deallocate thread infos.";
2929
}
3030

3131
private:
@@ -165,8 +165,6 @@ void DeleteIO(io_object_t value) {
165165
kernel_return_code =
166166
task_threads(mach_task_self(), &mach_threads.threads, &mach_threads.thread_count);
167167
if (kernel_return_code != KERN_SUCCESS) {
168-
FML_LOG(ERROR) << "Error retrieving task information: "
169-
<< mach_error_string(kernel_return_code);
170168
return std::nullopt;
171169
}
172170

@@ -203,8 +201,6 @@ void DeleteIO(io_object_t value) {
203201
num_threads--;
204202
break;
205203
default:
206-
FML_LOG(ERROR) << "Error retrieving thread information: "
207-
<< mach_error_string(kernel_return_code);
208204
return std::nullopt;
209205
}
210206
}
@@ -223,8 +219,6 @@ void DeleteIO(io_object_t value) {
223219
task_info(mach_task_self(), TASK_VM_INFO, reinterpret_cast<task_info_t>(&task_memory_info),
224220
&task_memory_info_count);
225221
if (kernel_return_code != KERN_SUCCESS) {
226-
FML_LOG(ERROR) << " Error retrieving task memory information: "
227-
<< mach_error_string(kernel_return_code);
228222
return std::nullopt;
229223
}
230224

0 commit comments

Comments
 (0)