mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-01 08:27:59 +00:00
Move fatal error at the right place.
Fix exit from top mode when checking if PMC is available. MFC after: 3 days
This commit is contained in:
parent
f6b93040fd
commit
410c766274
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206635
@ -581,6 +581,8 @@ pmcpl_cg_topdisplay(void)
|
|||||||
struct pmcstat_pmcrecord *pmcr;
|
struct pmcstat_pmcrecord *pmcr;
|
||||||
|
|
||||||
pmcr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter);
|
pmcr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter);
|
||||||
|
if (!pmcr)
|
||||||
|
err(EX_SOFTWARE, "ERROR: invalid pmcindex");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We pull out all callgraph nodes in the top-level hash table
|
* We pull out all callgraph nodes in the top-level hash table
|
||||||
|
@ -171,6 +171,8 @@ pmcstat_gmon_create_name(const char *samplesdir, struct pmcstat_image *image,
|
|||||||
char fullpath[PATH_MAX];
|
char fullpath[PATH_MAX];
|
||||||
|
|
||||||
pmcname = pmcstat_pmcid_to_name(pmcid);
|
pmcname = pmcstat_pmcid_to_name(pmcid);
|
||||||
|
if (!pmcname)
|
||||||
|
err(EX_SOFTWARE, "ERROR: cannot find pmcid");
|
||||||
|
|
||||||
(void) snprintf(fullpath, sizeof(fullpath),
|
(void) snprintf(fullpath, sizeof(fullpath),
|
||||||
"%s/%s/%s", samplesdir, pmcname,
|
"%s/%s/%s", samplesdir, pmcname,
|
||||||
|
@ -1050,7 +1050,6 @@ pmcstat_pmcid_to_name(pmc_id_t pmcid)
|
|||||||
if (pr->pr_pmcid == pmcid)
|
if (pr->pr_pmcid == pmcid)
|
||||||
return (pmcstat_string_unintern(pr->pr_pmcname));
|
return (pmcstat_string_unintern(pr->pr_pmcname));
|
||||||
|
|
||||||
err(EX_SOFTWARE, "ERROR: cannot find pmcid");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1083,7 +1082,6 @@ pmcstat_pmcindex_to_pmcr(int pmcin)
|
|||||||
if (pr->pr_pmcin == pmcin)
|
if (pr->pr_pmcin == pmcin)
|
||||||
return pr;
|
return pr;
|
||||||
|
|
||||||
err(EX_SOFTWARE, "ERROR: invalid pmcindex");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user