]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/port/stack_trace.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
8 #include "rocksdb/rocksdb_namespace.h"
10 namespace ROCKSDB_NAMESPACE
{
13 // Install a signal handler to print callstack on the following signals:
14 // SIGILL SIGSEGV SIGBUS SIGABRT
15 // Currently supports linux only. No-op otherwise.
16 void InstallStackTraceHandler();
18 // Prints stack, skips skip_first_frames frames
19 void PrintStack(int first_frames_to_skip
= 0);
21 // Prints the given callstack
22 void PrintAndFreeStack(void* callstack
, int num_frames
);
24 // Save the current callstack
25 void* SaveStack(int* num_frame
, int first_frames_to_skip
= 0);
28 } // namespace ROCKSDB_NAMESPACE