This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r217525 - in /branches/google/gcc-4_9: gcc/cove...
- From: xur at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 13 Nov 2014 23:08:18 -0000
- Subject: r217525 - in /branches/google/gcc-4_9: gcc/cove...
Author: xur
Date: Thu Nov 13 23:08:17 2014
New Revision: 217525
URL: https://gcc.gnu.org/viewcvs?rev=217525&root=gcc&view=rev
Log:
Support FDO build for Linus kernel.
2014-11-12 Rong Xu <xur@google.com>
* gcc/coverage.c (is_kernel_build): New decls.
(coverage_note_define): Set is_kernel_build
* gcc/gcov-io.c (struct gcov_var): Replace file operations
with macros, and support kernel build.
(gcov_rewrite): Ditto.
(gcov_open): Ditto.
(gcov_close): Ditto.
(gcov_write_block): Ditto.
(gcov_write_string_array): Ditto.
(gcov_read_words): Ditto.
(gcov_sync): Ditto.
(gcov_seek): Ditto.
(gcov_truncate): Ditto.
(k_popcountll): New function.
(gcov_read_summary): Support kernel build.
(gcov_read_comdat_zero_fixup): Ditto.
* gcc/gcov-io.h: Provide macro definitions for file operations.
* gcc/tree-profile.c (is_kernel_build): New global var.
(init_ic_make_global_vars): Don't emit tls for kernel
build.
(tree_init_instrumentation_sampling): Ditto.
(direct_call_profiling): Ditto.
* libgcc/Makefile.in : Install new files to gcov-src.
* libgcc/dyn-ipa.c (gcov_write_module_info): Move to libgcov-driver.c
and make it public.
(gcov_write_module_infos): Move the flag setting code from
gcov_write_module_info().
* libgcc/libgcov-driver-kernel.c (gcov_error): New kernel support.
(allocate_filename_struct): Ditto.
(gcov_open_by_filename): Ditto.
(gcov_strip_leading_dirs): Ditto.
(gcov_set_vfile): Ditto.
(kernel_file_fclose): Ditto.
(kernel_file_ftell): Ditto.
(kernel_file_fseek): Ditto.
(kernel_file_ftruncate): Ditto.
(kernel_file_fread): Ditto.
(kernel_file_fwrite): Ditto.
(kernel_file_fileno): Ditto.
* libgcc/libgcov-driver-system.c (gcov_exit_open_gcda_file): Move
to libgcov-driver.c.
* libgcc/libgcov-driver.c (free_fn_data): Kernel build support.
(libgcov-driver-kernel.c): New include to support kernel build.
(scan_build_info): Reformat to avoid c compiler warning.
(gcov_exit_merge_gcda): Ditto.
(gcov_scan_to_function_data): Avoid in kernel build
(gcov_write_comdat_zero_fixup) : Ditto.
(gcov_write_import_file): Ditto.
(gcov_dump_module_info): Ditto.
(gcov_exit): Ditto.
(__gcov_init): Ditto.
(gcov_write_func_counters): Kernel build support.
(gcov_exit_write_gcda): Ditto.
(gcov_exit_open_gcda_file): Moved from libgcov-driver.system.c.
(gcov_exit_dump_gcov): Kernel support (never merge), and
output modu_info for kernel lipo build.
(gcov_kernel_dump_gcov_init): New kernel support.
(gcov_kernel_dump_one_gcov): Ditto.
(gcov_write_module_info): Move from dyn-ipa.c.
* libgcc/libgcov-merge.c (__gcov_merge_dc): Kernel build support.
* libgcc/libgcov-kernel.h: New.
* libgcc/libgcov.h: Kernel build support.
Added:
branches/google/gcc-4_9/libgcc/libgcov-driver-kernel.c
branches/google/gcc-4_9/libgcc/libgcov-kernel.h
Modified:
branches/google/gcc-4_9/gcc/coverage.c
branches/google/gcc-4_9/gcc/gcov-io.c
branches/google/gcc-4_9/gcc/gcov-io.h
branches/google/gcc-4_9/gcc/tree-profile.c
branches/google/gcc-4_9/libgcc/Makefile.in
branches/google/gcc-4_9/libgcc/dyn-ipa.c
branches/google/gcc-4_9/libgcc/libgcov-driver-system.c
branches/google/gcc-4_9/libgcc/libgcov-driver.c
branches/google/gcc-4_9/libgcc/libgcov-merge.c
branches/google/gcc-4_9/libgcc/libgcov.h