summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2022-01-03 03:33:47 -0800
committerAndreas Kling <kling@serenityos.org>2022-01-05 14:04:18 +0100
commitaa77c2ca585531023b9ed53b686200534a65e6ff (patch)
treecb4581fc38ef2312b10ed0a3a3a949fdcfcd7ca0
parent1a2aad287f43f1081810772c9792eb2a20c07ed5 (diff)
downloadserenity-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.
-rw-r--r--Kernel/PerformanceEventBuffer.cpp4
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;