History

lib, stackdepot: add helper to print stack entries into buffer

To print stack entries into a buffer, users of stackdepot, first get a list of stack entries using stack_depot_fetch and then print this list into a buffer using stack_trace_snprint. Provide a helper in stackdepot for this purpose. Also change above mentioned users to use this helper. [imran.f.khan@oracle.com: fix build error] Link: https://lkml.kernel.org/r/20210915175321.3472770-4-imran.f.khan@oracle.com [imran.f.khan@oracle.com: export stack_depot_snprint() to modules] Link: https://lkml.kernel.org/r/20210916133535.3592491-4-imran.f.khan@oracle.com

Imran Khan committed 5 years ago

Commit 0f68d451 parent 505be487 files · +37 −31Browse files

Showing the changes to include (1 of 7 files). Show all

Unified · Split

include/linux/stackdepot.h+3−0
@@ -25,6 +25,9 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries, · 24 unmodified lines
25unsigned int stack_depot_fetch(depot_stack_handle_t handle,25unsigned int stack_depot_fetch(depot_stack_handle_t handle,
26 unsigned long **entries);26 unsigned long **entries);
27 27
28int stack_depot_snprint(depot_stack_handle_t handle, char *buf, size_t size,
29 int spaces);
30
28void stack_depot_print(depot_stack_handle_t stack);31void stack_depot_print(depot_stack_handle_t stack);
29 32
30#ifdef CONFIG_STACKDEPOT33#ifdef CONFIG_STACKDEPOT

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t