]> git.proxmox.com Git - ceph.git/blame - ceph/src/rocksdb/port/stack_trace.h
bump version to 18.2.2-pve1
[ceph.git] / ceph / src / rocksdb / port / stack_trace.h
CommitLineData
7c673cae 1// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
11fdf7f2
TL
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).
7c673cae
FG
5//
6#pragma once
f67539c2
TL
7
8#include "rocksdb/rocksdb_namespace.h"
9
10namespace ROCKSDB_NAMESPACE {
7c673cae
FG
11namespace port {
12
13// Install a signal handler to print callstack on the following signals:
14// SIGILL SIGSEGV SIGBUS SIGABRT
1e59de90
TL
15// And also (Linux ony for now) overrides security settings to allow outside
16// processes to attach to this one as a debugger. ONLY USE FOR NON-SECURITY
17// CRITICAL PROCESSES such as unit tests or benchmarking tools.
18// Currently supports only some POSIX implementations. No-op otherwise.
7c673cae
FG
19void InstallStackTraceHandler();
20
21// Prints stack, skips skip_first_frames frames
22void PrintStack(int first_frames_to_skip = 0);
23
20effc67
TL
24// Prints the given callstack
25void PrintAndFreeStack(void* callstack, int num_frames);
26
27// Save the current callstack
28void* SaveStack(int* num_frame, int first_frames_to_skip = 0);
29
7c673cae 30} // namespace port
f67539c2 31} // namespace ROCKSDB_NAMESPACE