1//===-- sanitizer_stackdepot.h ----------------------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file is shared between AddressSanitizer and ThreadSanitizer
11// run-time libraries.
12//===----------------------------------------------------------------------===//
13#ifndef SANITIZER_STACKDEPOT_H
14#define SANITIZER_STACKDEPOT_H
15
16#include "sanitizer_internal_defs.h"
17
18namespace __sanitizer {
19
20// StackDepot efficiently stores huge amounts of stack traces.
21
22// Maps stack trace to an unique id.
23u32 StackDepotPut(const uptr *stack, uptr size);
24// Retrieves a stored stack trace by the id.
25const uptr *StackDepotGet(u32 id, uptr *size);
26
27struct StackDepotStats {
28  uptr n_uniq_ids;
29  uptr mapped;
30};
31
32StackDepotStats *StackDepotGetStats();
33
34}  // namespace __sanitizer
35
36#endif  // SANITIZER_STACKDEPOT_H
37