add static

This commit is contained in:
zy
2023-11-16 13:25:52 +08:00
parent 8950e12801
commit 29c0e81de5
2 changed files with 11 additions and 11 deletions

View File

@@ -7,6 +7,14 @@
#include <linux/syscalls.h>
#include <linux/tracehook.h>
typedef struct {
struct rcu_head rcu_head;
pid_t pid;
struct mm_struct *mm;
char cgroup_buf[256];
char argv[256];
} mm_info;
struct stack_trace {
unsigned int nr_entries, max_entries;
unsigned long *entries;
@@ -168,7 +176,7 @@ static inline void __save_stack_trace_user(struct stack_trace *trace) {
}
}
void perfect_save_stack_trace_user(struct stack_trace *trace) {
static void perfect_save_stack_trace_user(struct stack_trace *trace) {
/*
* Trace user stack if we are not a kernel thread
*/
@@ -179,7 +187,7 @@ void perfect_save_stack_trace_user(struct stack_trace *trace) {
trace->entries[trace->nr_entries++] = ULONG_MAX;
}
void diagnose_save_stack_trace_user(unsigned long *backtrace) {
static void diagnose_save_stack_trace_user(unsigned long *backtrace) {
struct stack_trace trace;
memset(&trace, 0, sizeof(trace));
@@ -189,7 +197,7 @@ void diagnose_save_stack_trace_user(unsigned long *backtrace) {
perfect_save_stack_trace_user(&trace);
}
void diagnose_save_stack_trace_user_remote(struct task_struct *tsk,
static void diagnose_save_stack_trace_user_remote(struct task_struct *tsk,
unsigned long *backtrace) {
struct stack_trace trace;

View File

@@ -62,14 +62,6 @@ typedef struct {
proc_chains_detail proc_chains; // process chains argv
} variable_monitor_task;
typedef struct {
struct rcu_head rcu_head;
pid_t pid;
struct mm_struct *mm;
char cgroup_buf[256];
char argv[256];
} mm_info;
typedef struct {
struct radix_tree_root mm_tree;
spinlock_t mm_tree_lock;