Patch by Tomas Bily <tbily@suse.cz>
* cgraphunit.c (cgraph_finalize_function): Updating of pid * tree-profile.c: (tree_init_ic_make_global_vars): New function (tree_init_edge_profiler): call of tree_init_ic_make_global_vars (tree_gen_ic_profiler): New function (tree_gen_ic_func_profiler): New function (tree_profiling): Added calling of tree_gen_ic_func_profiler (tree_profile_hooks): Added hook for indirec/virtual calls * value-prof.c (tree_find_values_to_profile): New case for indirect calls (tree_values_to_profile): Call for determining indirect/virtual counters (tree_indirect_call_to_profile): New function (tree_ic_transform): New function (tree_ic): New function (find_func_by_pid): New function (init_pid_map): New function (tree_value_profile_transformations): Added check for indirect/virtual call transformation * value-prof.h (enum hist_type): New counter type for indirect/virtual calls (profile_hooks): Added new hook for profiling indirect/virtual calls * profile.c (instrument_values): New case for indirect/virtual call added * gcov-io.h (GCOV_LAST_VALUE_COUNTER): Changed to 6 (GCOV_COUNTER_V_INDIR): New counter type (GCOV_COUNTER_NAMES): New name of counter "indirect" added (GCOV_MERGE_FUNCTIONS): New merge function for indirect/virtual call added * cgraph.c: Definition of cgraph_max_pid (cgraph_create_node): Default init of pid attribute * cgraph.h: Declaration of cgraph_max_pid (struct cgraph_node): Added pid attribute * libgcov.c (__gcov_indirect_call_profiler): New function (__gcov_one_value_profiler_body): New function (__gcov_one_value_profiler): Body was moved to __gcov_one_value_profiler_body and calls it gcc.dg/tree-prof/indir-call-prof.c: New. g++.dg/dg.exp: Add tree-prof subdirectory. g++.dg/tree-prof/indir-call-prof.C: New. g++.dg/tree-prof/tree-prof.exp: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120975 138bc75d-0d04-0410-961f-82ee72b054a4
Showing
- gcc/ChangeLog 41 additions, 0 deletionsgcc/ChangeLog
- gcc/Makefile.in 3 additions, 2 deletionsgcc/Makefile.in
- gcc/cgraph.c 5 additions, 1 deletiongcc/cgraph.c
- gcc/cgraph.h 5 additions, 0 deletionsgcc/cgraph.h
- gcc/cgraphunit.c 1 addition, 0 deletionsgcc/cgraphunit.c
- gcc/gcov-io.h 7 additions, 4 deletionsgcc/gcov-io.h
- gcc/libgcov.c 20 additions, 3 deletionsgcc/libgcov.c
- gcc/predict.c 1 addition, 0 deletionsgcc/predict.c
- gcc/profile.c 8 additions, 0 deletionsgcc/profile.c
- gcc/testsuite/ChangeLog 7 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/g++.dg/dg.exp 1 addition, 0 deletionsgcc/testsuite/g++.dg/dg.exp
- gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C 39 additions, 0 deletionsgcc/testsuite/g++.dg/tree-prof/indir-call-prof.C
- gcc/testsuite/g++.dg/tree-prof/tree-prof.exp 53 additions, 0 deletionsgcc/testsuite/g++.dg/tree-prof/tree-prof.exp
- gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c 45 additions, 0 deletionsgcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c
- gcc/tree-profile.c 143 additions, 1 deletiongcc/tree-profile.c
- gcc/value-prof.c 250 additions, 1 deletiongcc/value-prof.c
- gcc/value-prof.h 6 additions, 1 deletiongcc/value-prof.h
Loading
Please register or sign in to comment