Blame gprof/hist.h

Packit Service 72eb06
/* hist.h
Packit Service 72eb06
Packit Service 72eb06
   Copyright (C) 2000-2018 Free Software Foundation, Inc.
Packit Service 72eb06
Packit Service 72eb06
   This file is part of GNU Binutils.
Packit Service 72eb06
Packit Service 72eb06
   This program is free software; you can redistribute it and/or modify
Packit Service 72eb06
   it under the terms of the GNU General Public License as published by
Packit Service 72eb06
   the Free Software Foundation; either version 3 of the License, or
Packit Service 72eb06
   (at your option) any later version.
Packit Service 72eb06
Packit Service 72eb06
   This program is distributed in the hope that it will be useful,
Packit Service 72eb06
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 72eb06
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 72eb06
   GNU General Public License for more details.
Packit Service 72eb06
Packit Service 72eb06
   You should have received a copy of the GNU General Public License
Packit Service 72eb06
   along with this program; if not, write to the Free Software
Packit Service 72eb06
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
Packit Service 72eb06
   MA 02110-1301, USA.  */
Packit Service 72eb06

Packit Service 72eb06
#ifndef hist_h
Packit Service 72eb06
#define hist_h
Packit Service 72eb06
Packit Service 72eb06
typedef struct histogram
Packit Service 72eb06
{
Packit Service 72eb06
  bfd_vma lowpc;
Packit Service 72eb06
  bfd_vma highpc;
Packit Service 72eb06
  unsigned int num_bins;
Packit Service 72eb06
  int *sample;           /* Histogram samples (shorts in the file!).  */
Packit Service 72eb06
} histogram;
Packit Service 72eb06
Packit Service 72eb06
extern histogram * histograms;
Packit Service 72eb06
extern unsigned    num_histograms;
Packit Service 72eb06
Packit Service 72eb06
/* Scale factor converting samples to pc values:
Packit Service 72eb06
   each sample covers HIST_SCALE bytes.  */
Packit Service 72eb06
extern double hist_scale;
Packit Service 72eb06
Packit Service 72eb06
extern void hist_read_rec        (FILE *, const char *);
Packit Service 72eb06
extern void hist_write_hist      (FILE *, const char *);
Packit Service 72eb06
extern void hist_assign_samples  (void);
Packit Service 72eb06
extern void hist_print           (void);
Packit Service 72eb06
Packit Service 72eb06
/* Checks if ADDRESS is within the range of addresses for which
Packit Service 72eb06
   we have histogram data.  Returns 1 if so and 0 otherwise.  */
Packit Service 72eb06
extern int hist_check_address (unsigned address);
Packit Service 72eb06
Packit Service 72eb06
/* Given a range of addresses for a symbol, find a histogram record
Packit Service 72eb06
   that intersects with this range, and clips the range to that
Packit Service 72eb06
   histogram record, modifying *P_LOWPC and *P_HIGHPC.
Packit Service 72eb06
Packit Service 72eb06
   If no intersection is found, *P_LOWPC and *P_HIGHPC will be set to
Packit Service 72eb06
   one unspecified value.  If more that one intersection is found,
Packit Service 72eb06
   an error is emitted.  */
Packit Service 72eb06
extern void hist_clip_symbol_address (bfd_vma *p_lowpc, bfd_vma *p_highpc);
Packit Service 72eb06
Packit Service 72eb06
#endif /* hist_h */