GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "intl.h"
#include "diagnostic.h"
#include "version.h"
#include "gcov-io.h"
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#include <getopt.h>
Variables | |
static bool | verbose |
static const struct option | merge_options [] |
static const struct option | merge_stream_options [] |
static const struct option | rewrite_options [] |
static const struct option | overlap_options [] |
int | overlap_func_level |
int | overlap_obj_level |
int | overlap_hot_only |
int | overlap_use_fullname |
double | overlap_hot_threshold = 0.005 |
static const struct option | options [] |
Driver for profile merge subcommand.
References fatal_error(), gcov_set_verbose(), ggc_alloc(), input_location, merge_options, merge_usage(), NULL, profile_merge(), and verbose.
Referenced by main().
Driver for profile merge-stream subcommand.
References fatal_error(), fnotice(), gcov_do_dump(), gcov_profile_merge_stream(), gcov_set_verbose(), ggc_alloc(), input_location, merge_stream_options, merge_stream_usage(), NULL, and verbose.
Referenced by main().
Driver for profile overlap subcommand.
References gcov_set_verbose(), ggc_alloc(), NULL, overlap_func_level, overlap_hot_only, overlap_hot_threshold, overlap_obj_level, overlap_options, overlap_usage(), overlap_use_fullname, profile_overlap(), and verbose.
Referenced by main().
Driver for profile rewrite subcommand.
References fatal_error(), fnotice(), gcov_set_verbose(), ggc_alloc(), input_location, NULL, profile_rewrite(), rewrite_options, rewrite_usage(), and verbose.
Referenced by main().
Referenced by do_merge_stream(), and gcov_output_files().
Referenced by gcov_output_files().
Output GCOV_INFO lists PROFILE to directory OUT. Note that we will remove all the gcda files in OUT.
References errno, F_OK, fatal_error(), free(), gcov_do_dump(), gcov_get_filename(), ggc_alloc(), input_location, NULL, and unlink_profile_dir().
Referenced by profile_merge(), and profile_rewrite().
|
extern |
Gcc offline profile processing tool support.
Copyright (C) 2014-2024 Free Software Foundation, Inc. Contributed by Rong Xu <xur@google.com>. 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. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>.
Referenced by profile_merge().
Referenced by do_merge_stream().
Referenced by profile_rewrite().
Referenced by profile_overlap().
Referenced by profile_rewrite().
Referenced by profile_merge(), profile_overlap(), and profile_rewrite().
Referenced by do_merge(), do_merge_stream(), do_overlap(), and do_rewrite().
int main | ( | int | argc, |
char ** | argv ) |
Main function for gcov-tool.
References diagnostic_initialize(), do_merge(), do_merge_stream(), do_overlap(), do_rewrite(), gcc_init_libintl, ggc_alloc(), global_dc, print_usage(), process_args(), and progname.
|
static |
Print merge-stream usage and exit.
References FATAL_EXIT_CODE, fnotice(), ggc_alloc(), and print_merge_stream_usage_message().
Referenced by do_merge_stream().
|
static |
Print merge usage and exit.
References FATAL_EXIT_CODE, fnotice(), ggc_alloc(), and print_merge_usage_message().
Referenced by do_merge().
|
static |
Print overlap usage and exit.
References FATAL_EXIT_CODE, fnotice(), ggc_alloc(), and print_overlap_usage_message().
Referenced by do_overlap().
Usage message for profile merge-stream.
References fnotice(), and ggc_alloc().
Referenced by merge_stream_usage(), and print_usage().
Usage message for profile merge.
References fnotice(), and ggc_alloc().
Referenced by merge_usage(), and print_usage().
Usage message for profile overlap.
References fnotice(), and ggc_alloc().
Referenced by overlap_usage(), and print_usage().
Usage function for profile rewrite.
References fnotice(), and ggc_alloc().
Referenced by print_usage(), and rewrite_usage().
Print a usage message and exit. If ERROR_P is nonzero, this is an error, otherwise the output of --help.
References FATAL_EXIT_CODE, fnotice(), ggc_alloc(), print_merge_stream_usage_message(), print_merge_usage_message(), print_overlap_usage_message(), print_rewrite_usage_message(), progname, and SUCCESS_EXIT_CODE.
Print version information and exit.
References _, fnotice(), ggc_alloc(), progname, and SUCCESS_EXIT_CODE.
Referenced by process_args().
Process args, return index to first non-arg.
References ggc_alloc(), NULL, print_usage(), and print_version().
Referenced by main().
|
static |
Merging profile D1 and D2 with weight as W1 and W2, respectively. The result profile is written to directory OUT. Return 0 on success.
References d1, d2, fnotice(), gcov_output_files(), gcov_profile_merge(), gcov_read_profile_dir(), ggc_alloc(), and verbose.
Referenced by do_merge().
Driver function to computer the overlap score b/w profile D1 and D2. Return 1 on error and 0 if OK.
References d1, d2, gcov_profile_overlap(), gcov_read_profile_dir(), and ggc_alloc().
Referenced by do_overlap().
|
static |
If N_VAL is no-zero, normalize the profile by setting the largest counter counter value to N_VAL and scale others counters proportionally. Otherwise, multiply the all counters by SCALE.
References d1, gcov_output_files(), gcov_profile_normalize(), gcov_profile_scale(), gcov_read_profile_dir(), and ggc_alloc().
Referenced by do_rewrite().
|
static |
Print profile rewrite usage and exit.
References FATAL_EXIT_CODE, fnotice(), ggc_alloc(), and print_rewrite_usage_message().
Referenced by do_rewrite().
Remove the gcda files in PATH recursively.
References ggc_alloc().
Referenced by gcov_output_files().
Referenced by do_merge().
Referenced by do_merge_stream().
int overlap_func_level |
Referenced by do_overlap().
int overlap_hot_only |
Referenced by do_overlap().
double overlap_hot_threshold = 0.005 |
Referenced by do_overlap().
int overlap_obj_level |
Referenced by do_overlap().
Referenced by do_overlap().
int overlap_use_fullname |
Referenced by do_overlap().
Referenced by do_rewrite().
|
static |
Set to verbose output mode.
Referenced by do_merge(), do_merge_stream(), do_overlap(), do_rewrite(), and profile_merge().