]> git.ipfire.org Git - thirdparty/gcc.git/blame - libsanitizer/sanitizer_common/sanitizer_stackdepot.h
libsanitizer mege from upstream r171973
[thirdparty/gcc.git] / libsanitizer / sanitizer_common / sanitizer_stackdepot.h
CommitLineData
f35db108
WM
1//===-- sanitizer_stackdepot.h ----------------------------------*- C++ -*-===//
2//
3// This file is distributed under the University of Illinois Open Source
4// License. See LICENSE.TXT for details.
5//
6//===----------------------------------------------------------------------===//
7//
8// This file is shared between AddressSanitizer and ThreadSanitizer
9// run-time libraries.
10//===----------------------------------------------------------------------===//
11#ifndef SANITIZER_STACKDEPOT_H
12#define SANITIZER_STACKDEPOT_H
13
14#include "sanitizer/common_interface_defs.h"
15
16namespace __sanitizer {
17
18// StackDepot efficiently stores huge amounts of stack traces.
19
20// Maps stack trace to an unique id.
21u32 StackDepotPut(const uptr *stack, uptr size);
22// Retrieves a stored stack trace by the id.
23const uptr *StackDepotGet(u32 id, uptr *size);
24
e9772e16
KS
25struct StackDepotStats {
26 uptr n_uniq_ids;
27 uptr mapped;
28};
29
30StackDepotStats *StackDepotGetStats();
31
f35db108
WM
32} // namespace __sanitizer
33
34#endif // SANITIZER_STACKDEPOT_H