@@ -50,8 +50,8 @@ struct stackframe {
50
50
#endif
51
51
};
52
52
53
- static notrace void start_backtrace (struct stackframe * frame , unsigned long fp ,
54
- unsigned long pc )
53
+ static notrace void unwind_init (struct stackframe * frame , unsigned long fp ,
54
+ unsigned long pc )
55
55
{
56
56
frame -> fp = fp ;
57
57
frame -> pc = pc ;
@@ -62,7 +62,7 @@ static notrace void start_backtrace(struct stackframe *frame, unsigned long fp,
62
62
/*
63
63
* Prime the first unwind.
64
64
*
65
- * In unwind_frame () we'll check that the FP points to a valid stack,
65
+ * In unwind_next () we'll check that the FP points to a valid stack,
66
66
* which can't be STACK_TYPE_UNKNOWN, and the first unwind will be
67
67
* treated as a transition to whichever stack that happens to be. The
68
68
* prev_fp value won't be used, but we set it to 0 such that it is
@@ -72,7 +72,7 @@ static notrace void start_backtrace(struct stackframe *frame, unsigned long fp,
72
72
frame -> prev_fp = 0 ;
73
73
frame -> prev_type = STACK_TYPE_UNKNOWN ;
74
74
}
75
- NOKPROBE_SYMBOL (start_backtrace );
75
+ NOKPROBE_SYMBOL (unwind_init );
76
76
77
77
/*
78
78
* Unwind from one frame record (A) to the next frame record (B).
@@ -81,8 +81,8 @@ NOKPROBE_SYMBOL(start_backtrace);
81
81
* records (e.g. a cycle), determined based on the location and fp value of A
82
82
* and the location (but not the fp value) of B.
83
83
*/
84
- static int notrace unwind_frame (struct task_struct * tsk ,
85
- struct stackframe * frame )
84
+ static int notrace unwind_next (struct task_struct * tsk ,
85
+ struct stackframe * frame )
86
86
{
87
87
unsigned long fp = frame -> fp ;
88
88
struct stack_info info ;
@@ -122,7 +122,7 @@ static int notrace unwind_frame(struct task_struct *tsk,
122
122
123
123
/*
124
124
* Record this frame record's values and location. The prev_fp and
125
- * prev_type are only meaningful to the next unwind_frame () invocation.
125
+ * prev_type are only meaningful to the next unwind_next () invocation.
126
126
*/
127
127
frame -> fp = READ_ONCE_NOCHECK (* (unsigned long * )(fp ));
128
128
frame -> pc = READ_ONCE_NOCHECK (* (unsigned long * )(fp + 8 ));
@@ -155,23 +155,23 @@ static int notrace unwind_frame(struct task_struct *tsk,
155
155
156
156
return 0 ;
157
157
}
158
- NOKPROBE_SYMBOL (unwind_frame );
158
+ NOKPROBE_SYMBOL (unwind_next );
159
159
160
- static void notrace walk_stackframe (struct task_struct * tsk ,
161
- struct stackframe * frame ,
162
- bool (* fn )(void * , unsigned long ), void * data )
160
+ static void notrace unwind (struct task_struct * tsk ,
161
+ struct stackframe * frame ,
162
+ bool (* fn )(void * , unsigned long ), void * data )
163
163
{
164
164
while (1 ) {
165
165
int ret ;
166
166
167
167
if (!fn (data , frame -> pc ))
168
168
break ;
169
- ret = unwind_frame (tsk , frame );
169
+ ret = unwind_next (tsk , frame );
170
170
if (ret < 0 )
171
171
break ;
172
172
}
173
173
}
174
- NOKPROBE_SYMBOL (walk_stackframe );
174
+ NOKPROBE_SYMBOL (unwind );
175
175
176
176
static bool dump_backtrace_entry (void * arg , unsigned long where )
177
177
{
@@ -213,14 +213,14 @@ noinline notrace void arch_stack_walk(stack_trace_consume_fn consume_entry,
213
213
struct stackframe frame ;
214
214
215
215
if (regs )
216
- start_backtrace (& frame , regs -> regs [29 ], regs -> pc );
216
+ unwind_init (& frame , regs -> regs [29 ], regs -> pc );
217
217
else if (task == current )
218
- start_backtrace (& frame ,
218
+ unwind_init (& frame ,
219
219
(unsigned long )__builtin_frame_address (1 ),
220
220
(unsigned long )__builtin_return_address (0 ));
221
221
else
222
- start_backtrace (& frame , thread_saved_fp (task ),
222
+ unwind_init (& frame , thread_saved_fp (task ),
223
223
thread_saved_pc (task ));
224
224
225
- walk_stackframe (task , & frame , consume_entry , cookie );
225
+ unwind (task , & frame , consume_entry , cookie );
226
226
}
0 commit comments