LispBM
lbm_prof.h
1 /*
2  Copyright 2023 Joel Svensson svenssonjoel@yahoo.se
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef LBM_PROF_H_
19 #define LBM_PROF_H_
20 
21 #include "heap.h"
22 #include "eval_cps.h"
23 
24 #define LBM_PROF_MAX_NAME_SIZE 20
25 
26 typedef struct {
27  lbm_cid cid;
28  bool has_name;
29  char name[LBM_PROF_MAX_NAME_SIZE];
30  lbm_uint count;
31  lbm_uint gc_count;
32 } lbm_prof_t;
33 
34 bool lbm_prof_init(lbm_prof_t *prof_data_buf,
35  lbm_uint prof_data_buf_num);
36 lbm_uint lbm_prof_get_num_samples(void);
37 lbm_uint lbm_prof_get_num_system_samples(void);
38 lbm_uint lbm_prof_get_num_sleep_samples(void);
39 lbm_uint lbm_prof_stop(void);
40 void lbm_prof_sample(void);
41 
42 #endif
Definition: lbm_prof.h:26