common_option.h File Reference

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

#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.

Classes

struct  options::spec

Namespaces

namespace  options

Typedefs

typedef int(* pp_fct_run_t )(options::spec const &spec)
 prototype of a pp tool entry point.

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)
 Answer the question 'did the user pass in a session-dir argument?'.

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

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


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

References op_exception::what().

Referenced by main().

bool was_session_dir_supplied ( void   ) 

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

Referenced by handle_options().


Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1