hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/include/linux/stackdepot.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * A generic stack depot implementation
34 *
....@@ -5,17 +6,6 @@
56 * Copyright (C) 2016 Google, Inc.
67 *
78 * Based on code by Dmitry Chernenkov.
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
199 */
2010
2111 #ifndef _LINUX_STACKDEPOT_H
....@@ -23,10 +13,21 @@
2313
2414 typedef u32 depot_stack_handle_t;
2515
26
-struct stack_trace;
16
+depot_stack_handle_t stack_depot_save(unsigned long *entries,
17
+ unsigned int nr_entries, gfp_t gfp_flags);
2718
28
-depot_stack_handle_t depot_save_stack(struct stack_trace *trace, gfp_t flags);
19
+unsigned int stack_depot_fetch(depot_stack_handle_t handle,
20
+ unsigned long **entries);
2921
30
-void depot_fetch_stack(depot_stack_handle_t handle, struct stack_trace *trace);
22
+unsigned int filter_irq_stacks(unsigned long *entries, unsigned int nr_entries);
23
+
24
+#ifdef CONFIG_STACKDEPOT
25
+int stack_depot_init(void);
26
+#else
27
+static inline int stack_depot_init(void)
28
+{
29
+ return 0;
30
+}
31
+#endif /* CONFIG_STACKDEPOT */
3132
3233 #endif