• Home
  • Raw
  • Download

Lines Matching full:stack

3  * Stack depot - a stack trace storage that avoids duplication.
5 * Stack depot is intended to be used by subsystems that need to store and
6 * later retrieve many potentially duplicated stack traces without wasting
9 * For example, KASAN needs to save allocation and free stack traces for each
10 * object. Storing two stack traces per object requires a lot of memory (e.g.
12 * stack traces often repeat, using stack depot allows to save about 100x space.
14 * Stack traces are never removed from the stack depot.
30 * Number of bits in the handle that stack depot doesn't use. Users may store
36 * Using stack depot requires its initialization, which can be done in 3 ways:
39 * scenarios where it's known at compile time that stack depot will be used.
40 * Enabling this config makes the kernel initialize stack depot in mm_init().
52 * config is disabled. The save/fetch/print stack depot functions can only be
54 * initializes stack depot via one of the ways listed above.
72 * __stack_depot_save - Save a stack trace to stack depot
74 * @entries: Pointer to the stack trace
75 * @nr_entries: Number of frames in the stack
77 * @can_alloc: Allocate stack pools (increased chance of failure if false)
79 * Saves a stack trace from @entries array of size @nr_entries. If @can_alloc is
80 * %true, stack depot can replenish the stack pools in case no space is left
82 * any allocations and fails if no space is left to store the stack trace.
84 * If the provided stack trace comes from the interrupt context, only the part
92 * Return: Handle of the stack struct stored in depot, 0 on failure
99 * stack_depot_save - Save a stack trace to stack depot
101 * @entries: Pointer to the stack trace
102 * @nr_entries: Number of frames in the stack
108 * Return: Handle of the stack trace stored in depot, 0 on failure
114 * stack_depot_fetch - Fetch a stack trace from stack depot
116 * @handle: Stack depot handle returned from stack_depot_save()
117 * @entries: Pointer to store the address of the stack trace
119 * Return: Number of frames for the fetched stack
125 * stack_depot_print - Print a stack trace from stack depot
127 * @stack: Stack depot handle returned from stack_depot_save()
129 void stack_depot_print(depot_stack_handle_t stack);
132 * stack_depot_snprint - Print a stack trace from stack depot into a buffer
134 * @handle: Stack depot handle returned from stack_depot_save()
145 * stack_depot_set_extra_bits - Set extra bits in a stack depot handle
147 * @handle: Stack depot handle returned from stack_depot_save()
150 * Return: Stack depot handle with extra bits set
152 * Stack depot handles have a few unused bits, which can be used for storing
153 * user-specific information. These bits are transparent to the stack depot.
159 * stack_depot_get_extra_bits - Retrieve extra bits from a stack depot handle
161 * @handle: Stack depot handle with extra bits saved
163 * Return: Extra bits retrieved from the stack depot handle