swh:1:snp:c3bf2749e3476071fa748f67b0ffa2fdc5fe49d9
Raw File
Tip revision: 519d81956ee277b4419c723adfb154603c2565ba authored by Linus Torvalds on 18 October 2021, 06:00:13 UTC
Linux 5.15-rc6
Tip revision: 519d819
stackdepot.h
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * A generic stack depot implementation
 *
 * Author: Alexander Potapenko <glider@google.com>
 * Copyright (C) 2016 Google, Inc.
 *
 * Based on code by Dmitry Chernenkov.
 */

#ifndef _LINUX_STACKDEPOT_H
#define _LINUX_STACKDEPOT_H

typedef u32 depot_stack_handle_t;

depot_stack_handle_t stack_depot_save(unsigned long *entries,
				      unsigned int nr_entries, gfp_t gfp_flags);

unsigned int stack_depot_fetch(depot_stack_handle_t handle,
			       unsigned long **entries);

unsigned int filter_irq_stacks(unsigned long *entries, unsigned int nr_entries);

#ifdef CONFIG_STACKDEPOT
int stack_depot_init(void);
#else
static inline int stack_depot_init(void)
{
	return 0;
}
#endif	/* CONFIG_STACKDEPOT */

#endif
back to top