Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
S_module Class Reference
Collaboration diagram for S_module:
Collaboration graph
[legend]

Public Member Functions

 S_module ()
 
void clear ()
 
void init (const char *name, const char *architecture, const char *event_name, unsigned int c_mask, unsigned int inv_mask, unsigned int smpl_period)
 
void set_total (unsigned int total)
 
unsigned int get_smpl_period ()
 
unsigned int get_inv_mask ()
 
unsigned int get_c_mask ()
 
std::string get_arch ()
 
std::string get_event ()
 
void add_sample (const char *index, unsigned int value)
 
bool get_max (char *index, unsigned int *value)
 
std::string get_module_name ()
 
unsigned int get_total_num_samples ()
 

Private Attributes

std::map< std::string,
unsigned int
samples
 
unsigned int total_num_samples
 
std::string module_name
 
std::string arch
 
std::string event
 
unsigned int cmask
 
unsigned int inv
 
unsigned int sp
 

Detailed Description

Definition at line 723 of file pfm_gen_analysis.cpp.

Constructor & Destructor Documentation

S_module::S_module ( )
inline

Definition at line 736 of file pfm_gen_analysis.cpp.

{
clear();
}

Member Function Documentation

void S_module::add_sample ( const char *  index,
unsigned int  value 
)
inline

Definition at line 784 of file pfm_gen_analysis.cpp.

{
samples[index] += value;
return;
}
void S_module::clear ( )
inline

Definition at line 740 of file pfm_gen_analysis.cpp.

{
sp = 0;
cmask = 0;
inv = 0;
sp = 0;
}
std::string S_module::get_arch ( )
inline

Definition at line 776 of file pfm_gen_analysis.cpp.

{
return arch;
}
unsigned int S_module::get_c_mask ( )
inline

Definition at line 772 of file pfm_gen_analysis.cpp.

{
return cmask;
}
std::string S_module::get_event ( )
inline

Definition at line 780 of file pfm_gen_analysis.cpp.

{
return event;
}
unsigned int S_module::get_inv_mask ( )
inline

Definition at line 768 of file pfm_gen_analysis.cpp.

{
return inv;
}
bool S_module::get_max ( char *  index,
unsigned int value 
)
inline

Definition at line 789 of file pfm_gen_analysis.cpp.

{
if(samples.empty()) return false;
unsigned int cur_max = 0;
{
if(it->second > cur_max)
{
cur_max = it->second;
max_pos = it;
}
}
strcpy(index, (max_pos->first).c_str());
*value = max_pos->second;
samples.erase(max_pos);
return true;
}
std::string S_module::get_module_name ( )
inline

Definition at line 807 of file pfm_gen_analysis.cpp.

{
return module_name;
}
unsigned int S_module::get_smpl_period ( )
inline

Definition at line 764 of file pfm_gen_analysis.cpp.

{
return sp;
}
unsigned int S_module::get_total_num_samples ( )
inline

Definition at line 811 of file pfm_gen_analysis.cpp.

{
}
void S_module::init ( const char *  name,
const char *  architecture,
const char *  event_name,
unsigned int  c_mask,
unsigned int  inv_mask,
unsigned int  smpl_period 
)
inline

Definition at line 750 of file pfm_gen_analysis.cpp.

{
module_name = name;
arch = architecture;
event = event_name;
cmask = c_mask;
inv = inv_mask;
sp = smpl_period;
}
void S_module::set_total ( unsigned int  total)
inline

Definition at line 759 of file pfm_gen_analysis.cpp.

{
return;
}

Member Data Documentation

std::string S_module::arch
private

Definition at line 729 of file pfm_gen_analysis.cpp.

unsigned int S_module::cmask
private

Definition at line 731 of file pfm_gen_analysis.cpp.

std::string S_module::event
private

Definition at line 730 of file pfm_gen_analysis.cpp.

unsigned int S_module::inv
private

Definition at line 732 of file pfm_gen_analysis.cpp.

std::string S_module::module_name
private

Definition at line 728 of file pfm_gen_analysis.cpp.

std::map<std::string, unsigned int> S_module::samples
private

Definition at line 726 of file pfm_gen_analysis.cpp.

unsigned int S_module::sp
private

Definition at line 733 of file pfm_gen_analysis.cpp.

unsigned int S_module::total_num_samples
private

Definition at line 727 of file pfm_gen_analysis.cpp.


The documentation for this class was generated from the following file:

Generated at Wed Nov 28 2012 12:17:33 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004