Bug 466762 - Add redirs for C23 free_sized() and free_aligned_sized()
[valgrind.git] / cachegrind / cachegrind.h
blobddc10abe597f1346ea9b57f5849e2d0ac7b42523
1 /*
2 ----------------------------------------------------------------
4 Notice that the following BSD-style license applies to this one
5 file (cachegrind.h) only. The rest of Valgrind is licensed under the
6 terms of the GNU General Public License, version 2, unless
7 otherwise indicated. See the COPYING file in the source
8 distribution for details.
10 ----------------------------------------------------------------
12 This file is part of Cachegrind, a high-precision tracing profiler
13 built with Valgrind.
15 Copyright (C) 2023-2023 Nicholas Nethercote. All rights reserved.
17 Redistribution and use in source and binary forms, with or without
18 modification, are permitted provided that the following conditions
19 are met:
21 1. Redistributions of source code must retain the above copyright
22 notice, this list of conditions and the following disclaimer.
24 2. The origin of this software must not be misrepresented; you must
25 not claim that you wrote the original software. If you use this
26 software in a product, an acknowledgment in the product
27 documentation would be appreciated but is not required.
29 3. Altered source versions must be plainly marked as such, and must
30 not be misrepresented as being the original software.
32 4. The name of the author may not be used to endorse or promote
33 products derived from this software without specific prior written
34 permission.
36 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
37 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
39 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
40 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
41 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
42 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
43 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
44 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
45 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
46 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 ----------------------------------------------------------------
50 Notice that the above BSD-style license applies to this one file
51 (cachegrind.h) only. The entire rest of Valgrind is licensed under
52 the terms of the GNU General Public License, version 2. See the
53 COPYING file in the source distribution for details.
55 ----------------------------------------------------------------
58 #ifndef __CACHEGRIND_H
59 #define __CACHEGRIND_H
61 #include "valgrind.h"
63 /* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !!
64 This enum comprises an ABI exported by Valgrind to programs
65 which use client requests. DO NOT CHANGE THE ORDER OF THESE
66 ENTRIES, NOR DELETE ANY -- add new ones at the end.
69 typedef
70 enum {
71 /* The `CG_` is required to distinguish these from the Callgrind
72 * client requests of the same name. Otherwise compile errors occur if
73 * you include both `cachegrind.h` and `callgrind.h`.
75 VG_USERREQ__CG_START_INSTRUMENTATION = VG_USERREQ_TOOL_BASE('C','G'),
76 VG_USERREQ__CG_STOP_INSTRUMENTATION
77 } Vg_CachegrindClientRequest;
79 /* Start Cachegrind instrumentation if not already enabled. Use this
80 * in combination with `CACHEGRIND_STOP_INSTRUMENTATION` and
81 * `--instr-at-start` to measure only part of a client program's
82 * execution.
84 #define CACHEGRIND_START_INSTRUMENTATION \
85 VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CG_START_INSTRUMENTATION, \
86 0, 0, 0, 0, 0)
88 /* Stop Cachegrind instrumentation if not already disabled. Use this
89 * in combination with `CACHEGRIND_START_INSTRUMENTATION` and
90 * `--instr-at-start` to measure only part of a client program's
91 * execution.
93 #define CACHEGRIND_STOP_INSTRUMENTATION \
94 VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CG_STOP_INSTRUMENTATION, \
95 0, 0, 0, 0, 0)
97 #endif /* __CACHEGRIND_H */