* cgraph.h (cgraph_node): Add profile_id. * value-prof.c (cgraph_node_map): Turn into pointer_map. (init_node_map): Rewrite to handle hashes increas of incremental IDs. (del_node_map): Update. (find_func_by_funcdef_no): Replace by ... (find_func_by_profile_id): ... this one. (gimple_ic_transform): Do not remove useful histograms when speculation is not done; dump info when indirect call removal can happen at LTO. * value-prof.h (find_func_by_profile_id, gimple_ic): Declare. * gcov-io.h (__gcov_indirect_call_profiler): Replace by ... (__gcov_indirect_call_profiler_v2): .. this one. * profile.h (init_node_map): Update. * coverage.c (coverage_compute_profile_id): New function. * coverage.h (coverage_compute_profile_id): Declare. * tree-profile.c (init_ic_make_global_vars): Make __gcov_indirect_call_callee and __gcov_indirect_call_counters global. (gimple_init_edge_profiler): Update prototype of __gcov_indirect_call_profiler. (gimple_gen_ic_func_profiler): Simplify. (tree_profiling): Use init_node_map From-SVN: r201634
61 lines
2.2 KiB
C
61 lines
2.2 KiB
C
/* coverage.h - Defines data exported from coverage.c
|
|
Copyright (C) 1998-2013 Free Software Foundation, Inc.
|
|
|
|
This file is part of GCC.
|
|
|
|
GCC is free software; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free
|
|
Software Foundation; either version 3, or (at your option) any later
|
|
version.
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GCC; see the file COPYING3. If not see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef GCC_COVERAGE_H
|
|
#define GCC_COVERAGE_H
|
|
|
|
#include "gcov-io.h"
|
|
|
|
extern void coverage_init (const char *);
|
|
extern void coverage_finish (void);
|
|
|
|
/* Start outputting coverage information for the current
|
|
function. */
|
|
extern int coverage_begin_function (unsigned, unsigned);
|
|
|
|
/* Complete the coverage information for the current function. */
|
|
extern void coverage_end_function (unsigned, unsigned);
|
|
|
|
/* Compute the control flow checksum for the current function. */
|
|
extern unsigned coverage_compute_cfg_checksum (void);
|
|
|
|
/* Compute the profile id of function N. */
|
|
extern unsigned coverage_compute_profile_id (struct cgraph_node *n);
|
|
|
|
/* Compute the line number checksum for the current function. */
|
|
extern unsigned coverage_compute_lineno_checksum (void);
|
|
|
|
/* Allocate some counters. Repeatable per function. */
|
|
extern int coverage_counter_alloc (unsigned /*counter*/, unsigned/*num*/);
|
|
/* Use a counter from the most recent allocation. */
|
|
extern tree tree_coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/);
|
|
/* Use a counter address from the most recent allocation. */
|
|
extern tree tree_coverage_counter_addr (unsigned /*counter*/, unsigned/*num*/);
|
|
|
|
/* Get all the counters for the current function. */
|
|
extern gcov_type *get_coverage_counts (unsigned /*counter*/,
|
|
unsigned /*expected*/,
|
|
unsigned /*cfg_checksum*/,
|
|
unsigned /*lineno_checksum*/,
|
|
const struct gcov_ctr_summary **);
|
|
|
|
extern tree get_gcov_type (void);
|
|
|
|
#endif
|