mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Specify inline capacity of return type in capture_stack_trace
Since the inline capacity of the Vector return type was not specified explicitly, the vector was automatically copied to a 0-length inline capacity one, essentially eliminating the optimization.
This commit is contained in:
parent
d3dfb957a6
commit
03b7352286
Notes:
sideshowbarker
2024-07-17 20:49:14 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/03b73522868 Pull-request: https://github.com/SerenityOS/serenity/pull/11932 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/creator1creeper1
2 changed files with 2 additions and 2 deletions
|
@ -398,7 +398,7 @@ public:
|
|||
NEVER_INLINE void switch_context(Thread*& from_thread, Thread*& to_thread);
|
||||
[[noreturn]] static void assume_context(Thread& thread, FlatPtr flags);
|
||||
FlatPtr init_context(Thread& thread, bool leave_crit);
|
||||
static Vector<FlatPtr> capture_stack_trace(Thread& thread, size_t max_frames = 0);
|
||||
static Vector<FlatPtr, 32> capture_stack_trace(Thread& thread, size_t max_frames = 0);
|
||||
|
||||
static StringView platform_string();
|
||||
};
|
||||
|
|
|
@ -491,7 +491,7 @@ const DescriptorTablePointer& Processor::get_gdtr()
|
|||
return m_gdtr;
|
||||
}
|
||||
|
||||
Vector<FlatPtr> Processor::capture_stack_trace(Thread& thread, size_t max_frames)
|
||||
Vector<FlatPtr, 32> Processor::capture_stack_trace(Thread& thread, size_t max_frames)
|
||||
{
|
||||
FlatPtr frame_ptr = 0, ip = 0;
|
||||
Vector<FlatPtr, 32> stack_trace;
|
||||
|
|
Loading…
Reference in a new issue