r221401 - in /branches/google/gcc-4_9: gcc/para...

xur@gcc.gnu.org xur@gcc.gnu.org
Thu Mar 12 17:30:00 GMT 2015


Author: xur
Date: Thu Mar 12 17:30:35 2015
New Revision: 221401

URL: https://gcc.gnu.org/viewcvs?rev=221401&root=gcc&view=rev
Log:
2015-03-12  Rong Xu  <xur@google.com>

Add locking to indirect-call-topn profile to avoid corrupted
indirect-call-topn profile. This locking incurs significant
slowdown to highly-threaded programs. We use sampling to
reduce the overhead.

	* gcc/params.def (PARAM_LIPO_SAMPLING_PERIOD): New.
	* gcc/tree-profile.c (__gcov_lipo_sampling_period): New.
	(gcov_lipo_sampling_period): New.
	* libgcc/libgcov-driver.c (__gcov_lipo_sampling_period): New.
	(gcov_scaling_lipo_counters): New.
	(gcov_exit_dump_gcov): Add lipo sampling support.
	(__gcov_init): Ditto.
	* libgcc/libgcov-profiler.c 
	(__gcov_indirect_call_topn_profiler): Ditto.
	(__gcov_direct_call_profiler): Ditto.
	(__gcov_topn_value_profiler_body): Add locking.
	* gcc/testsuite/g++.dg/tree-prof/lipo/indir-call-prof_0.C: Add option.
	* gcc/testsuite/gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c: Ditto.
	* gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof-single_0.c: Ditto.
	* gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_0.c: Ditto.


Modified:
    branches/google/gcc-4_9/gcc/params.def
    branches/google/gcc-4_9/gcc/testsuite/g++.dg/tree-prof/lipo/indir-call-prof_0.C
    branches/google/gcc-4_9/gcc/testsuite/gcc.dg/tree-prof/lipo/ic-misattribution-1_0.c
    branches/google/gcc-4_9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof-single_0.c
    branches/google/gcc-4_9/gcc/testsuite/gcc.dg/tree-prof/lipo/indir-call-prof_0.c
    branches/google/gcc-4_9/gcc/tree-profile.c
    branches/google/gcc-4_9/libgcc/libgcov-driver.c
    branches/google/gcc-4_9/libgcc/libgcov-profiler.c



More information about the Gcc-cvs mailing list