src/Profile/utils/pprof.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <errno.h>
#include <string.h>
#include <iostream.h>
#include <unistd.h>
#include <fcntl.h>
#include <map.h>

Include dependency graph for pprof.cpp:

Go to the source code of this file.

Classes

struct  ltstr
class  FunctionData

Defines

#define FALSE   0
#define TRUE   1
#define MAX_COUNTERS   1024
#define SIZE_OF_LINE   64*1024
#define SIZE_OF_FILENAME   1024

Functions

int FunctionSummaryInfo (int no, int ctx, int thr, int max)
bool IsDynamicProfiling (char *filename)
int InitFuncNameBuf (void)
int FillFunctionDB (int node, int ctx, int thr, char *prefix)
int FillFunctionDBInContext (int node, int ctx, int thr, char *prefix)
int FillFunctionDBInNode (int node, int ctx, int thr, char *prefix)
int DumpFunctionNamesInDB (void)
int DumpFtabFile (char *prefix)
int ProcessFileDynamic (int node, int ctx, int thr, int max, char *prefix)
int ProcessFileDynamicInContext (int node, int ctx, int thr, int maxfuncs, char *prefix)
int ProcessFileDynamicInNode (int node, int ctx, int thr, int maxfuncs, char *prefix)
int main (int argc, char *argv[])

Variables

int top_level_function
double max_thread_cumusec = 0.0
map< const char *, FunctionData,
ltstr
funcDB


Define Documentation

#define FALSE   0
 

Definition at line 76 of file pprof.cpp.

#define MAX_COUNTERS   1024
 

Definition at line 133 of file pprof.cpp.

#define SIZE_OF_FILENAME   1024
 

Definition at line 135 of file pprof.cpp.

Referenced by DumpFtabFile(), FillFunctionDB(), IsDynamicProfiling(), main(), and ProcessFileDynamic().

#define SIZE_OF_LINE   64*1024
 

Definition at line 134 of file pprof.cpp.

Referenced by FillFunctionDB(), and ProcessFileDynamic().

#define TRUE   1
 

Definition at line 77 of file pprof.cpp.


Function Documentation

int DumpFtabFile char *  prefix  ) 
 

Definition at line 505 of file pprof.cpp.

References SIZE_OF_FILENAME.

int DumpFunctionNamesInDB void   ) 
 

Definition at line 495 of file pprof.cpp.

References funcDB.

Referenced by main().

int FillFunctionDB int  node,
int  ctx,
int  thr,
char *  prefix
 

Definition at line 309 of file pprof.cpp.

References endl(), header, SIZE_OF_FILENAME, and SIZE_OF_LINE.

Referenced by FillFunctionDBInContext().

Here is the call graph for this function:

int FillFunctionDBInContext int  node,
int  ctx,
int  thr,
char *  prefix
 

Definition at line 469 of file pprof.cpp.

References FALSE, FillFunctionDB(), and TRUE.

Referenced by FillFunctionDBInNode().

Here is the call graph for this function:

int FillFunctionDBInNode int  node,
int  ctx,
int  thr,
char *  prefix
 

Definition at line 481 of file pprof.cpp.

References FALSE, FillFunctionDBInContext(), and TRUE.

Referenced by main().

Here is the call graph for this function:

int FunctionSummaryInfo int  no,
int  ctx,
int  thr,
int  max
 

Definition at line 720 of file pprof.cpp.

References top_level_function, and TRUE.

int InitFuncNameBuf void   ) 
 

Definition at line 279 of file pprof.cpp.

References funcDB.

Referenced by main().

bool IsDynamicProfiling char *  filename  ) 
 

Definition at line 247 of file pprof.cpp.

References SIZE_OF_FILENAME.

Referenced by main().

int main int  argc,
char *  argv[]
 

Definition at line 2330 of file pprof.cpp.

References DumpFunctionNamesInDB(), FALSE, FillFunctionDBInNode(), funcDB, InitFuncNameBuf(), IsDynamicProfiling(), optarg, optind, ProcessFileDynamicInNode(), SIZE_OF_FILENAME, and TRUE.

Here is the call graph for this function:

int ProcessFileDynamic int  node,
int  ctx,
int  thr,
int  max,
char *  prefix
 

Definition at line 538 of file pprof.cpp.

References funcDB, SIZE_OF_FILENAME, and SIZE_OF_LINE.

Referenced by ProcessFileDynamicInContext().

int ProcessFileDynamicInContext int  node,
int  ctx,
int  thr,
int  maxfuncs,
char *  prefix
 

Definition at line 1009 of file pprof.cpp.

References FALSE, ProcessFileDynamic(), and TRUE.

Referenced by ProcessFileDynamicInNode().

Here is the call graph for this function:

int ProcessFileDynamicInNode int  node,
int  ctx,
int  thr,
int  maxfuncs,
char *  prefix
 

Definition at line 1022 of file pprof.cpp.

References FALSE, ProcessFileDynamicInContext(), and TRUE.

Referenced by main().

Here is the call graph for this function:


Variable Documentation

map<const char*, FunctionData, ltstr> funcDB
 

Definition at line 245 of file pprof.cpp.

Referenced by DumpFunctionNamesInDB(), InitFuncNameBuf(), main(), and ProcessFileDynamic().

double max_thread_cumusec = 0.0
 

Definition at line 120 of file pprof.cpp.

int top_level_function
 

Definition at line 119 of file pprof.cpp.

Referenced by FunctionSummaryInfo().


Generated on Mon Jan 16 14:19:41 2006 for IPPL by  doxygen 1.4.6