~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/gprof/hist.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

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