this repo has no description
1/* Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) */
2#pragma once
3
4#if defined(OS_LINUX)
5
6#include <sdt.h>
7
8#define EVENT(probe_name) DTRACE_PROBE(python, probe_name)
9
10#define EVENT_ID(probe_name, id) \
11 DTRACE_PROBE1(python, probe_name, static_cast<word>(id))
12
13#elif defined(OS_OSX)
14
15// Adding USDT probes is a bit more complicated on macOS than Linux and
16// requires an intermediate build step. See
17// https://www.unix.com/man-page/osx/1/dtrace/ for more details.
18
19#define EVENT(probe_name)
20
21#define EVENT_ID(probe_name, id)
22
23#endif