osprey-gcc-4.2.0/gcc/gcov.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "intl.h"
#include "version.h"
#include <getopt.h>
#include "gcov-io.h"
#include "gcov-io.c"

Include dependency graph for gcov.c:

Go to the source code of this file.

Data Types

type  arc_info
type  block_info
type  function_info
type  coverage_info
type  line_info
type  source_info

Defines

#define IN_GCOV   1
#define STRING_SIZE   200

Typedefs

typedef struct arc_info arc_t
typedef struct block_info block_t
typedef struct function_info function_t
typedef struct coverage_info coverage_t
typedef struct line_info line_t
typedef struct source_info source_t

Functions/Subroutines

static void fnotice (FILE *, const char *,...)
static void print_usage (int error_p)
static void print_version (void)
static int process_args (int argc, char **argv)
static void process_file (const char *file_name)
static void release_structures (void)
static void create_file_names (const char *file_name)
static source_tfind_source (const char *file_name)
static int read_graph_file (void)
static int read_count_file (void)
static void solve_flow_graph (function_t *fn)
static void add_branch_counts (coverage_t *coverage, const arc_t *arc)
static char const * format_gcov (gcov_type top, gcov_type bottom, int dp)
static void function_summary (const coverage_t *coverage, const char *title)
static char * make_gcov_file_name (const char *input_name, const char *src_name)
static void add_line_counts (coverage_t *coverage, function_t *fn)
static void accumulate_line_counts (source_t *src)
static int output_branch_count (FILE *gcov_file, int ix, const arc_t *arc)
static void output_lines (FILE *gcov_file, const source_t *src)

Variables

static function_tfunctions
static source_tsources
static struct gcov_summary object_summary
static unsigned program_count
static time_t bbg_file_time
static char * bbg_file_name
static unsigned bbg_stamp
static char * da_file_name
static int no_data_file
static int flag_branches = 0
static int flag_unconditional = 0
static int flag_gcov_file = 1
static int flag_long_names = 0
static int flag_all_blocks = 0
static int flag_function_summary = 0
static char * object_directory = 0
static int flag_preserve_paths = 0
static int flag_counts = 0
static struct option options []


Define Documentation

#define IN_GCOV   1

Definition at line 53 of file gcov.c.

#define STRING_SIZE   200

Definition at line 68 of file gcov.c.


Typedef Documentation


Function Documentation

static void accumulate_line_counts ( source_t src  )  [static]

static void add_branch_counts ( coverage_t coverage,
const arc_t arc 
) [static]

static void add_line_counts ( coverage_t coverage,
function_t fn 
) [static]

static void create_file_names ( const char *  file_name  )  [static]

static source_t* find_source ( const char *  file_name  )  [static]

static void fnotice ( FILE file,
const char *  cmsgid,
  ... 
) [static]

static char const* format_gcov ( gcov_type  top,
gcov_type  bottom,
int  dp 
) [static]

Definition at line 1336 of file gcov.c.

References float, HOST_WIDEST_INT, HOST_WIDEST_INT_PRINT_DEC, percent, is::ratio, sprintf(), and unsigned.

static void function_summary ( const coverage_t coverage,
const char *  title 
) [static]

static char* make_gcov_file_name ( const char *  input_name,
const char *  src_name 
) [static]

static int output_branch_count ( FILE gcov_file,
int  ix,
const arc_t arc 
) [static]

Definition at line 1738 of file gcov.c.

References flag_counts, flag_unconditional, fnotice(), and format_gcov().

static void output_lines ( FILE gcov_file,
const source_t src 
) [static]

static void print_usage ( int  error_p  )  [static]

Definition at line 387 of file gcov.c.

References bug_report_url, exit(), FATAL_EXIT_CODE, fnotice(), and SUCCESS_EXIT_CODE.

static void print_version ( void   )  [static]

Definition at line 415 of file gcov.c.

References _, exit(), fnotice(), fprintf(), SUCCESS_EXIT_CODE, and version_string.

static int process_args ( int  argc,
char **  argv 
) [static]

static void process_file ( const char *  file_name  )  [static]

static int read_count_file ( void   )  [static]

static int read_graph_file ( void   )  [static]

static void release_structures ( void   )  [static]

static void solve_flow_graph ( function_t fn  )  [static]


Variable Documentation

char* bbg_file_name [static]

Definition at line 271 of file gcov.c.

Definition at line 267 of file gcov.c.

unsigned bbg_stamp [static]

Definition at line 274 of file gcov.c.

char* da_file_name [static]

Definition at line 278 of file gcov.c.

int flag_all_blocks = 0 [static]

Definition at line 305 of file gcov.c.

int flag_branches = 0 [static]

Definition at line 286 of file gcov.c.

int flag_counts = 0 [static]

Definition at line 325 of file gcov.c.

int flag_function_summary = 0 [static]

Definition at line 309 of file gcov.c.

int flag_gcov_file = 1 [static]

Definition at line 294 of file gcov.c.

int flag_long_names = 0 [static]

Definition at line 300 of file gcov.c.

int flag_preserve_paths = 0 [static]

Definition at line 320 of file gcov.c.

int flag_unconditional = 0 [static]

Definition at line 289 of file gcov.c.

function_t* functions [static]

Definition at line 254 of file gcov.c.

int no_data_file [static]

Definition at line 282 of file gcov.c.

Referenced by output_lines(), and read_count_file().

char* object_directory = 0 [static]

Definition at line 314 of file gcov.c.

Definition at line 262 of file gcov.c.

struct option options[] [static]

Initial value:

{
  { "help",                 no_argument,       NULL, 'h' },
  { "version",              no_argument,       NULL, 'v' },
  { "all-blocks",           no_argument,       NULL, 'a' },
  { "branch-probabilities", no_argument,       NULL, 'b' },
  { "branch-counts",        no_argument,       NULL, 'c' },
  { "no-output",            no_argument,       NULL, 'n' },
  { "long-file-names",      no_argument,       NULL, 'l' },
  { "function-summaries",   no_argument,       NULL, 'f' },
  { "preserve-paths",       no_argument,       NULL, 'p' },
  { "object-directory",     required_argument, NULL, 'o' },
  { "object-file",          required_argument, NULL, 'o' },
  { "unconditional-branches", no_argument,     NULL, 'u' },
  { 0, 0, 0, 0 }
}

Definition at line 427 of file gcov.c.

unsigned program_count [static]

Definition at line 263 of file gcov.c.

source_t* sources [static]

Definition at line 258 of file gcov.c.


Generated on Wed Apr 8 15:33:07 2009 for Open64 by  doxygen 1.5.6