1 /* Copyright (C) 2021-2024 Free Software Foundation, Inc.
4 This file is part of GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
21 #ifndef _COLLECTORAPI_H
22 #define _COLLECTORAPI_H
24 /* This file contains function prototypes for the user-callable API
25 routines in libcollector. */
33 /* Routine to record a sample in the experiment. */
34 extern void collector_sample (const char *name
);
36 /* Routine to suspend data collection during an experiment. */
37 extern void collector_pause (void);
39 /* Routine to resume data collection during an experiment. */
40 extern void collector_resume (void);
42 /* Routine to suspend per-thread data collection during an experiment. */
43 extern void collector_thread_pause (pthread_t tid
);
45 /* Routine to resume per-thread data collection during an experiment. */
46 extern void collector_thread_resume (pthread_t tid
);
48 /* Routine to close the experiment, and stop all data collection. */
49 extern void collector_terminate_expt (void);
57 /* Routines to let libcollector know about dynamically loaded functions. */
58 extern void collector_func_load (const char *name
, const char *alias
,
59 const char *sourcename
, void *vaddr
,
60 int size
, int lntsize
, Lineno
*lntable
);
62 extern void collector_func_unload (void *vaddr
);
64 #ifdef NEED_COLLECTOR_MODULE
65 extern void collector_module_load (const char *modulename
, void *vaddr
);
66 extern void collector_module_unload (void *vaddr
);
73 #endif /* _COLLECTORAPI_H */