86 realmain(
int argc,
char*
const* argv);
107 main(
int argc,
char*
const* argv)
118 catch (
const std::bad_alloc& x) {
119 DIAG_EMsg(
"[std::bad_alloc] " << x.what());
122 catch (
const std::exception& x) {
123 DIAG_EMsg(
"[std::exception] " << x.what());
127 DIAG_EMsg(
"Unknown exception encountered!");
139 args.
parse(argc, argv);
150 if (nArgs.
paths->size() == 0) {
151 std::cerr <<
"ERROR: command line directories" 152 " contain no .hpcrun files; no database generated\n";
161 && nArgs.
paths->size() > 16
163 DIAG_Throw(
"You have requested thread-level metrics for " << nArgs.
paths->size() <<
" profile files. Because this may result in an unusable database, to continue you must use the --force-metric option.");
202 bool printProgress =
true;
245 if (args.
title.empty()) {
282 uint mSrcBeg = 0, mSrcEnd = numSrc;
284 uint mDrvdBeg = 0, mDrvdEnd = 0;
289 bool needMultiOccurance =
295 mDrvdEnd = mMgr.
size();
299 for (
uint mId = mSrcBeg; mId < mSrcEnd; ++mId) {
312 for (
uint mId = mSrcBeg; mId < mSrcEnd; ++mId) {
332 for (
uint i = mDrvdBeg; i < mDrvdEnd; ++i) {
void prof_abort(int error_code)
void aggregateMetricsIncl(uint mBegId, uint mEndId)
void readStructure(Prof::Struct::Tree *structure, const Analysis::Args &args)
NormalizeProfileArgs_t normalizeProfileArgs(const StringVec &inPaths)
void normalize(Prof::CallPath::Profile &prof, string agent, bool doNormalizeTy)
std::vector< std::string > structureFiles
static bool MetricFlg_isSum(uint flags)
void overlayStaticStructureMain(Prof::CallPath::Profile &prof, string agent, bool doNormalizeTy, bool printProgress)
void pruneStructTree(Prof::CallPath::Profile &prof)
bool hpcprof_forceMetrics
std::vector< uint > UIntVec
static RealPathMgr & singleton()
std::string searchPathStr
void makeDatabase(Prof::CallPath::Profile &prof, const Analysis::Args &args)
void computeMetrics(const Metric::Mgr &mMgr, uint mBegId, uint mEndId, bool doFinal)
void parse(int argc, const char *const argv[])
static bool MetricFlg_isSet(uint flags, MetricFlg x)
uint makeSummaryMetrics(bool needAllStats, bool needMultiOccurance, uint srcBegId=Mgr::npos, uint srcEndId=Mgr::npos)
virtual std::string message() const
static void makeMetrics(Prof::CallPath::Profile &prof, const Analysis::Args &args, const Analysis::Util::NormalizeProfileArgs_t &nArgs)
ComputedTy computedType() const
int main(int argc, char *argv[])
std::pair< iterator, bool > insert(const VMA beg, const VMA end)
std::vector< std::string > profileFiles
const std::string & searchPaths() const
const Metric::Mgr * metricMgr() const
void disable_redundancy(bool flag)
Prof::Struct::Tree * structure() const
void aggregateMetricsExcl(uint mBegId, uint mEndId)
static bool MetricFlg_isThread(uint flags)
void pruneBySummaryMetrics(Prof::CallPath::Profile &prof, uint8_t *prunedNodes)
uint makeDensePreorderIds()
Prof::CallPath::Profile * read(const Util::StringVec &profileFiles, const Util::UIntVec *groupMap, int mergeTy, uint rFlags, uint mrgFlags)
Metric::ADesc * metric(uint i)
static int realmain(int argc, char *const *argv)
const std::string & name() const