Use optab_libfunc to access sync_lock_test_and_set libfunc on hppa-linux.
[official-gcc.git] / libgcc / gcov.h
blob66d03bf4e5d466255a6caa0abe33d14cd3ce7452
1 /* GCOV interface routines.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
25 #ifndef GCC_GCOV_H
26 #define GCC_GCOV_H
28 struct gcov_info;
30 /* Set all counters to zero. */
32 extern void __gcov_reset (void);
34 /* Write profile information to a file. */
36 extern void __gcov_dump (void);
38 /* Convert the gcov information referenced by INFO to a gcda data stream.
39 The FILENAME_FN callback is called exactly once with the filename associated
40 with the gcov information. The filename may be NULL. Afterwards, the
41 DUMP_FN callback is subsequently called with chunks (the begin and length of
42 the chunk are passed as the first two callback parameters) of the gcda data
43 stream. The ALLOCATE_FN callback shall allocate memory with a size in
44 characters specified by the first callback parameter. The ARG parameter is
45 a user-provided argument passed as the last argument to the callback
46 functions. */
48 extern void
49 __gcov_info_to_gcda (const struct gcov_info *__info,
50 void (*__filename_fn) (const char *, void *),
51 void (*__dump_fn) (const void *, unsigned, void *),
52 void *(*__allocate_fn) (unsigned, void *),
53 void *__arg);
55 #endif /* GCC_GCOV_H */