mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
Everywhere: Remove some redundant inline
keywords
Functions defined inside class bodies (including static functions) are implicitly inline, no need to type it out.
This commit is contained in:
parent
5fa8068580
commit
0a3cc10bb6
7 changed files with 39 additions and 39 deletions
|
@ -14,7 +14,7 @@ namespace Kernel {
|
|||
|
||||
class PerformanceManager {
|
||||
public:
|
||||
inline static void add_process_created_event(Process& process)
|
||||
static void add_process_created_event(Process& process)
|
||||
{
|
||||
if (g_profiling_all_threads) {
|
||||
VERIFY(g_global_perf_events);
|
||||
|
@ -22,14 +22,14 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_process_exec_event(Process& process)
|
||||
static void add_process_exec_event(Process& process)
|
||||
{
|
||||
if (auto* event_buffer = process.current_perf_events_buffer()) {
|
||||
(void)event_buffer->add_process(process, ProcessEventType::Exec);
|
||||
}
|
||||
}
|
||||
|
||||
inline static void add_process_exit_event(Process& process)
|
||||
static void add_process_exit_event(Process& process)
|
||||
{
|
||||
if (g_profiling_all_threads) {
|
||||
VERIFY(g_global_perf_events);
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_thread_created_event(Thread& thread)
|
||||
static void add_thread_created_event(Thread& thread)
|
||||
{
|
||||
if (thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -47,7 +47,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_thread_exit_event(Thread& thread)
|
||||
static void add_thread_exit_event(Thread& thread)
|
||||
{
|
||||
// As an exception this doesn't check whether profiling is suppressed for
|
||||
// the thread so we can record the thread_exit event anyway.
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_cpu_sample_event(Thread& current_thread, RegisterState const& regs, u32 lost_time)
|
||||
static void add_cpu_sample_event(Thread& current_thread, RegisterState const& regs, u32 lost_time)
|
||||
{
|
||||
if (current_thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -66,21 +66,21 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_mmap_perf_event(Process& current_process, Memory::Region const& region)
|
||||
static void add_mmap_perf_event(Process& current_process, Memory::Region const& region)
|
||||
{
|
||||
if (auto* event_buffer = current_process.current_perf_events_buffer()) {
|
||||
[[maybe_unused]] auto res = event_buffer->append(PERF_EVENT_MMAP, region.vaddr().get(), region.size(), region.name());
|
||||
}
|
||||
}
|
||||
|
||||
inline static void add_unmap_perf_event(Process& current_process, Memory::VirtualRange const& region)
|
||||
static void add_unmap_perf_event(Process& current_process, Memory::VirtualRange const& region)
|
||||
{
|
||||
if (auto* event_buffer = current_process.current_perf_events_buffer()) {
|
||||
[[maybe_unused]] auto res = event_buffer->append(PERF_EVENT_MUNMAP, region.base().get(), region.size(), {});
|
||||
}
|
||||
}
|
||||
|
||||
inline static void add_context_switch_perf_event(Thread& current_thread, Thread& next_thread)
|
||||
static void add_context_switch_perf_event(Thread& current_thread, Thread& next_thread)
|
||||
{
|
||||
if (current_thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -89,7 +89,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_kmalloc_perf_event(Thread& current_thread, size_t size, FlatPtr ptr)
|
||||
static void add_kmalloc_perf_event(Thread& current_thread, size_t size, FlatPtr ptr)
|
||||
{
|
||||
if (current_thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_kfree_perf_event(Thread& current_thread, size_t size, FlatPtr ptr)
|
||||
static void add_kfree_perf_event(Thread& current_thread, size_t size, FlatPtr ptr)
|
||||
{
|
||||
if (current_thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -107,7 +107,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_page_fault_event(Thread& thread, RegisterState const& regs)
|
||||
static void add_page_fault_event(Thread& thread, RegisterState const& regs)
|
||||
{
|
||||
if (thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -117,7 +117,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_syscall_event(Thread& thread, RegisterState const& regs)
|
||||
static void add_syscall_event(Thread& thread, RegisterState const& regs)
|
||||
{
|
||||
if (thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
inline static void add_read_event(Thread& thread, int fd, size_t size, OpenFileDescription const& file_description, u64 start_timestamp, ErrorOr<FlatPtr> result)
|
||||
static void add_read_event(Thread& thread, int fd, size_t size, OpenFileDescription const& file_description, u64 start_timestamp, ErrorOr<FlatPtr> result)
|
||||
{
|
||||
if (thread.is_profiling_suppressed())
|
||||
return;
|
||||
|
@ -161,7 +161,7 @@ public:
|
|||
[[maybe_unused]] auto rc = event_buffer->append(PERF_EVENT_READ, fd, size, {}, &thread, filepath_string_index, start_timestamp, result); // wrong arguments
|
||||
}
|
||||
|
||||
inline static void timer_tick(RegisterState const& regs)
|
||||
static void timer_tick(RegisterState const& regs)
|
||||
{
|
||||
static Time last_wakeup;
|
||||
auto now = kgettimeofday();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue