2012-10-29 Wei Mi <wmi@google.com>
[official-gcc.git] / libasan / sanitizer_common / sanitizer_stackdepot.h
blobc4c388aa74d2fb634b7a96405918d0f844aec2d6
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
14 #include "sanitizer/common_interface_defs.h"
16 namespace __sanitizer {
18 // StackDepot efficiently stores huge amounts of stack traces.
20 // Maps stack trace to an unique id.
21 u32 StackDepotPut(const uptr *stack, uptr size);
22 // Retrieves a stored stack trace by the id.
23 const uptr *StackDepotGet(u32 id, uptr *size);
25 } // namespace __sanitizer
27 #endif // SANITIZER_STACKDEPOT_H