[Sanitizer] extend internal libc with stat/fstat/lstat functions
[blocksruntime.git] / lib / sanitizer_common / sanitizer_stackdepot.h
blob5915fdbb4310f66a386c1ee339e1949816380eef
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
16 #include "sanitizer_internal_defs.h"
18 namespace __sanitizer {
20 // StackDepot efficiently stores huge amounts of stack traces.
22 // Maps stack trace to an unique id.
23 u32 StackDepotPut(const uptr *stack, uptr size);
24 // Retrieves a stored stack trace by the id.
25 const uptr *StackDepotGet(u32 id, uptr *size);
27 struct StackDepotStats {
28 uptr n_uniq_ids;
29 uptr mapped;
32 StackDepotStats *StackDepotGetStats();
34 } // namespace __sanitizer
36 #endif // SANITIZER_STACKDEPOT_H