1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
// SPDX-License-Identifier: Apache-2.0
/*
* USDT emission for the ddheap provider.
*
* Kept as non-inline functions in a separate translation unit so that each
* probe has one USDT() expansion and one .note.stapsdt entry. The intent
* is that callers always reach the probe via a call instruction rather
* than having it inlined at multiple sites.
*
* The immediate concern is bindgen's wrap_static_fns: if these were static
* inline, it would generate a wrapper stub for each one containing its own
* USDT() expansion, likely producing duplicate .note.stapsdt entries and
* causing bpftrace to attach twice. LTO could in principle inline these
* across TU boundaries and cause similar problems, though we haven't
* tested that path.
*/
/* Save / restore errno: an attached USDT consumer may perturb it. */
void
void