Exemple #1
0
static int
main_objCorrelation(const Args& args)
{
  std::ostream& os = std::cout;
  
  for (uint i = 0; i < args.profileFiles.size(); ++i) {
    const std::string& fnm = args.profileFiles[i];

    // 0. Generate nice header
    os << std::setfill('=') << std::setw(77) << "=" << std::endl;
    os << fnm << std::endl;
    os << std::setfill('=') << std::setw(77) << "=" << std::endl;

    // 1. Create metric descriptors
    Prof::Metric::Mgr metricMgr;
    metricMgr.makeRawMetrics(fnm, 
			     false/*isUnitsEvents*/, 
			     args.obj_metricsAsPercents);
    
    // 2. Correlate
    Analysis::Flat::correlateWithObject(metricMgr, os,
					args.obj_showSourceCode,
					args.obj_procGlobs,
					args.obj_procThreshold);
  }
  return 0;
}
Exemple #2
0
static int
main_srcCorrelation(const Args& args)
{
  RealPathMgr::singleton().searchPaths(args.searchPathStr());

  //-------------------------------------------------------
  // Create metric descriptors
  //-------------------------------------------------------
  Prof::Metric::Mgr metricMgr;
  metricMgr.makeRawMetrics(args.profileFiles);
  makeDerivedMetrics(metricMgr, args.prof_metrics);

  //-------------------------------------------------------
  // Correlate metrics with program structure and Generate output
  //-------------------------------------------------------
  Prof::Struct::Tree structure("", new Prof::Struct::Root(""));

  Analysis::Flat::Driver driver(args, metricMgr, structure);
  int ret = driver.run();

  return ret;
}