Change section_offsets to a std::vector
[deliverable/binutils-gdb.git] / gprof / hist.h
CommitLineData
ef368dac 1/* hist.h
0eee5820 2
b3adc24a 3 Copyright (C) 2000-2020 Free Software Foundation, Inc.
ef368dac 4
651dbc76 5 This file is part of GNU Binutils.
ef368dac 6
651dbc76
NC
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
ef368dac 11
651dbc76
NC
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
ef368dac 16
651dbc76
NC
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20 MA 02110-1301, USA. */
ef368dac 21\f
252b5132
RH
22#ifndef hist_h
23#define hist_h
24
b3296dc5
VP
25typedef struct histogram
26{
27 bfd_vma lowpc;
28 bfd_vma highpc;
29 unsigned int num_bins;
30 int *sample; /* Histogram samples (shorts in the file!). */
31} histogram;
32
c34f4fc6
NC
33extern histogram * histograms;
34extern unsigned num_histograms;
ef368dac
NC
35
36/* Scale factor converting samples to pc values:
37 each sample covers HIST_SCALE bytes. */
252b5132
RH
38extern double hist_scale;
39
3e8f6abf
BE
40extern void hist_read_rec (FILE *, const char *);
41extern void hist_write_hist (FILE *, const char *);
42extern void hist_assign_samples (void);
43extern void hist_print (void);
252b5132 44
b3296dc5
VP
45/* Checks if ADDRESS is within the range of addresses for which
46 we have histogram data. Returns 1 if so and 0 otherwise. */
47extern int hist_check_address (unsigned address);
48
f3445b37 49/* Given a range of addresses for a symbol, find a histogram record
b3296dc5
VP
50 that intersects with this range, and clips the range to that
51 histogram record, modifying *P_LOWPC and *P_HIGHPC.
f3445b37 52
b3296dc5
VP
53 If no intersection is found, *P_LOWPC and *P_HIGHPC will be set to
54 one unspecified value. If more that one intersection is found,
55 an error is emitted. */
56extern void hist_clip_symbol_address (bfd_vma *p_lowpc, bfd_vma *p_highpc);
57
252b5132 58#endif /* hist_h */
This page took 0.780195 seconds and 4 git commands to generate.