diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2022-01-03 03:33:47 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-05 14:04:18 +0100 |
commit | aa77c2ca585531023b9ed53b686200534a65e6ff (patch) | |
tree | cb4581fc38ef2312b10ed0a3a3a949fdcfcd7ca0 /Kernel/PerformanceEventBuffer.cpp | |
parent | 1a2aad287f43f1081810772c9792eb2a20c07ed5 (diff) | |
download | serenity-aa77c2ca585531023b9ed53b686200534a65e6ff.zip |
Kernel: Use unchecked_append in PerformanceEventBuffer `raw_backtrace()`
We always validate the size before we append, so there is
no reason to use the checked append.
Diffstat (limited to 'Kernel/PerformanceEventBuffer.cpp')
-rw-r--r-- | Kernel/PerformanceEventBuffer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/PerformanceEventBuffer.cpp b/Kernel/PerformanceEventBuffer.cpp index c86ef04073..1a24f500cb 100644 --- a/Kernel/PerformanceEventBuffer.cpp +++ b/Kernel/PerformanceEventBuffer.cpp @@ -38,7 +38,7 @@ static Vector<FlatPtr, PerformanceEvent::max_stack_frame_count> raw_backtrace(Fl { Vector<FlatPtr, PerformanceEvent::max_stack_frame_count> backtrace; if (ip != 0) - backtrace.append(ip); + backtrace.unchecked_append(ip); FlatPtr stack_ptr_copy; FlatPtr stack_ptr = bp; // FIXME: Figure out how to remove this SmapDisabler without breaking profile stacks. @@ -63,7 +63,7 @@ static Vector<FlatPtr, PerformanceEvent::max_stack_frame_count> raw_backtrace(Fl break; if (retaddr == 0) break; - backtrace.append(retaddr); + backtrace.unchecked_append(retaddr); if (backtrace.size() == PerformanceEvent::max_stack_frame_count) break; stack_ptr = stack_ptr_copy; |