mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 07:46:08 +00:00

Summary: This patch implements the initialisation and patching routines for the XRay runtime, along with the necessary trampolines for function entry/exit handling. For now we only define the basic hooks for allowing an implementation to define a handler that gets run on function entry/exit. We expose a minimal API for controlling the behaviour of the runtime (patching, cleanup, and setting the handler to invoke when instrumenting). Depends on D19904 Reviewers: echristo, kcc, rnk Subscribers: rnk, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D21612 llvm-svn: 276117
19 lines
636 B
C++
19 lines
636 B
C++
//===-- xray_flags.inc ------------------------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// XRay runtime flags.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#ifndef XRAY_FLAG
|
|
#error "Define XRAY_FLAG prior to including this file!"
|
|
#endif
|
|
|
|
XRAY_FLAG(bool, patch_premain, true,
|
|
"Whether to patch instrumentation points before main.")
|