summaryrefslogtreecommitdiff
path: root/fs/bcachefs/util.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-02-12 23:15:53 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:53 -0400
commit3ea4219d9894130008d723fb9e9c24290d4a42b6 (patch)
tree27ed69d416057e774000ef0e9727e7a2be85d41b /fs/bcachefs/util.h
parent429dd4270fab3c88a8bfcb5b2b8c6d60ec6a1f2a (diff)
bcachefs: New backtrace utility code
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.h')
-rw-r--r--fs/bcachefs/util.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h
index 67b0d3de24cc..4188f380f54f 100644
--- a/fs/bcachefs/util.h
+++ b/fs/bcachefs/util.h
@@ -20,6 +20,8 @@
#include "mean_and_variance.h"
+#include "darray.h"
+
struct closure;
#ifdef CONFIG_BCACHEFS_DEBUG
@@ -361,7 +363,11 @@ u64 bch2_read_flag_list(char *, const char * const[]);
void bch2_prt_u64_binary(struct printbuf *, u64, unsigned);
void bch2_print_string_as_lines(const char *prefix, const char *lines);
-int bch2_prt_backtrace(struct printbuf *, struct task_struct *);
+
+typedef DARRAY(unsigned long) bch_stacktrace;
+int bch2_save_backtrace(bch_stacktrace *stack, struct task_struct *);
+void bch2_prt_backtrace(struct printbuf *, bch_stacktrace *);
+int bch2_prt_task_backtrace(struct printbuf *, struct task_struct *);
#define NR_QUANTILES 15
#define QUANTILE_IDX(i) inorder_to_eytzinger0(i, NR_QUANTILES)