common_option.h File Reference

#include <vector>
#include <list>
#include "arrange_profiles.h"
#include "demangle_symbol.h"
Include dependency graph for common_option.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  options::spec

Namespaces

namespace  options

Typedefs

typedef int(* pp_fct_run_t )(options::spec const &spec)

Functions

int run_pp_tool (int argc, char const *argv[], pp_fct_run_t fct)
demangle_type handle_demangle_option (std::string const &option)
merge_option handle_merge_option (std::vector< std::string > const &mergespec, bool allow_lib, bool exclude_dependent)
bool was_session_dir_supplied (void)

Variables

bool options::verbose

Detailed Description

Declaration of entry point of pp tools, implementation file add common options of pp tools and some miscelleaneous functions

Remarks:
Copyright 2003 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie

Definition in file common_option.h.


Typedef Documentation

typedef int(* pp_fct_run_t)(options::spec const &spec)

prototype of a pp tool entry point. This entry point is called by run_pp_tool

Definition at line 41 of file common_option.h.


Function Documentation

demangle_type handle_demangle_option ( std::string const &  option  ) 
Parameters:
option one of [smart,none,normal]

return the demangle_type of option or throw an exception if option is not valid.

merge_option handle_merge_option ( std::vector< std::string > const &  mergespec,
bool  allow_lib,
bool  exclude_dependent 
)
Parameters:
mergespec merge option
allow_lib is merge)lib allowed in mergespec
exclude_dependent user specified --exclude-dependent

parse merge option and return a merge_option filled from it.

int run_pp_tool ( int  argc,
char const *  argv[],
pp_fct_run_t  fct 
)
Parameters:
argc command line number of argument
argv command line argument pointer array
fct function to run to start this pp tool

Provide a common entry to all pp tools, parsing all options, handling common options and providing the necessary try catch clause

Definition at line 218 of file common_option.cpp.

References get_options(), and op_exception::what().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

bool was_session_dir_supplied ( void   ) 

Answer the question 'did the user pass in a session-dir argument?'.

Definition at line 317 of file common_option.cpp.

Referenced by handle_options().

Here is the caller graph for this function:


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1