mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
Kernel: Remove FIXME about unsurfaced error and log something
If something goes wrong when trying to write out a perfcore file during process finalization, there's nowhere to report an error to, other than the debug log. So write it to the debug log.
This commit is contained in:
parent
31791945ab
commit
ac8fe3d062
Notes:
sideshowbarker
2024-07-19 01:56:13 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ac8fe3d0625
1 changed files with 4 additions and 2 deletions
|
@ -597,9 +597,11 @@ void Process::finalize()
|
|||
if (!description_or_error.is_error()) {
|
||||
auto& description = description_or_error.value();
|
||||
auto json = m_perf_event_buffer->to_json(m_pid, m_executable ? m_executable->absolute_path() : "");
|
||||
// FIXME: Should this error path be surfaced somehow?
|
||||
auto json_buffer = UserOrKernelBuffer::for_kernel_buffer(json.data());
|
||||
(void)description->write(json_buffer, json.size());
|
||||
auto result = description->write(json_buffer, json.size());
|
||||
if (result.is_error()) {
|
||||
dbgln("Error while writing perfcore file: {}", result.error().error());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue