Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 09:11:08

0001 /*
0002    ----------------------------------------------------------------
0003 
0004    Notice that the following BSD-style license applies to this one
0005    file (cachegrind.h) only.  The rest of Valgrind is licensed under the
0006    terms of the GNU General Public License, version 2, unless
0007    otherwise indicated.  See the COPYING file in the source
0008    distribution for details.
0009 
0010    ----------------------------------------------------------------
0011 
0012    This file is part of Cachegrind, a high-precision tracing profiler
0013    built with Valgrind.
0014 
0015    Copyright (C) 2023-2023 Nicholas Nethercote.  All rights reserved.
0016 
0017    Redistribution and use in source and binary forms, with or without
0018    modification, are permitted provided that the following conditions
0019    are met:
0020 
0021    1. Redistributions of source code must retain the above copyright
0022       notice, this list of conditions and the following disclaimer.
0023 
0024    2. The origin of this software must not be misrepresented; you must
0025       not claim that you wrote the original software.  If you use this
0026       software in a product, an acknowledgment in the product
0027       documentation would be appreciated but is not required.
0028 
0029    3. Altered source versions must be plainly marked as such, and must
0030       not be misrepresented as being the original software.
0031 
0032    4. The name of the author may not be used to endorse or promote
0033       products derived from this software without specific prior written
0034       permission.
0035 
0036    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
0037    OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
0038    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0039    ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
0040    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0041    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
0042    GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0043    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
0044    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
0045    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0046    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0047 
0048    ----------------------------------------------------------------
0049 
0050    Notice that the above BSD-style license applies to this one file
0051    (cachegrind.h) only.  The entire rest of Valgrind is licensed under
0052    the terms of the GNU General Public License, version 2.  See the
0053    COPYING file in the source distribution for details.
0054 
0055    ----------------------------------------------------------------
0056 */
0057 
0058 #ifndef __CACHEGRIND_H
0059 #define __CACHEGRIND_H
0060 
0061 #include "valgrind.h"
0062 
0063 /* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !!
0064    This enum comprises an ABI exported by Valgrind to programs
0065    which use client requests.  DO NOT CHANGE THE ORDER OF THESE
0066    ENTRIES, NOR DELETE ANY -- add new ones at the end.
0067  */
0068 
0069 typedef
0070    enum {
0071       /* The `CG_` is required to distinguish these from the Callgrind
0072        * client requests of the same name. Otherwise compile errors occur if
0073        * you include both `cachegrind.h` and `callgrind.h`.
0074        */
0075       VG_USERREQ__CG_START_INSTRUMENTATION = VG_USERREQ_TOOL_BASE('C','G'),
0076       VG_USERREQ__CG_STOP_INSTRUMENTATION
0077    } Vg_CachegrindClientRequest;
0078 
0079 /* Start Cachegrind instrumentation if not already enabled. Use this
0080  * in combination with `CACHEGRIND_STOP_INSTRUMENTATION` and
0081  * `--instr-at-start` to measure only part of a client program's
0082  * execution.
0083  */
0084 #define CACHEGRIND_START_INSTRUMENTATION                                \
0085   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CG_START_INSTRUMENTATION, \
0086                                   0, 0, 0, 0, 0)
0087 
0088 /* Stop Cachegrind instrumentation if not already disabled. Use this
0089  * in combination with `CACHEGRIND_START_INSTRUMENTATION` and
0090  * `--instr-at-start` to measure only part of a client program's
0091  * execution.
0092  */
0093 #define CACHEGRIND_STOP_INSTRUMENTATION                                \
0094   VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CG_STOP_INSTRUMENTATION, \
0095                                   0, 0, 0, 0, 0)
0096 
0097 #endif /* __CACHEGRIND_H */
0098