diff options
author | Mitchell Horne <mhorne@FreeBSD.org> | 2021-05-31 14:23:19 +0000 |
---|---|---|
committer | Mitchell Horne <mhorne@FreeBSD.org> | 2021-07-29 15:01:10 +0000 |
commit | 3a9b3a8470261d052d25a2a2b628a0dd214d1091 (patch) | |
tree | 6b00df816b8ee8277b3ec22563a29e9f414ea3f4 | |
parent | b44f0bd4109fd2dcbedd2dcab19c4bd1c3037153 (diff) | |
download | src-3a9b3a8470261d052d25a2a2b628a0dd214d1091.tar.gz src-3a9b3a8470261d052d25a2a2b628a0dd214d1091.zip |
libpmc: remove pe->alias
It has never been a part of upstream's struct pmu_event. The jevents
utility will not fill this field, so remove it.
Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30530
(cherry picked from commit 0c915023dbb7000cd30bb768eb84f6dc757adcc5)
-rw-r--r-- | lib/libpmc/libpmc_pmu_util.c | 4 | ||||
-rw-r--r-- | lib/libpmc/pmu-events/pmu-events.h | 1 |
2 files changed, 0 insertions, 5 deletions
diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 1b2c10e07368..6a287a66a2f8 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -302,8 +302,6 @@ pmc_pmu_sample_rate_get(const char *event_name) event_name = pmu_alias_get(event_name); if ((pe = pmu_event_get(NULL, event_name, NULL)) == NULL) return (DEFAULT_SAMPLE_COUNT); - if (pe->alias && (pe = pmu_event_get(NULL, pe->alias, NULL)) == NULL) - return (DEFAULT_SAMPLE_COUNT); if (pe->event == NULL) return (DEFAULT_SAMPLE_COUNT); if (pmu_parse_event(&ped, pe->event)) @@ -526,8 +524,6 @@ pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) event_name = pmu_alias_get(event_name); if ((pe = pmu_event_get(NULL, event_name, &idx)) == NULL) return (ENOENT); - if (pe->alias && (pe = pmu_event_get(NULL, pe->alias, &idx)) == NULL) - return (ENOENT); assert(idx >= 0); pm->pm_ev = idx; diff --git a/lib/libpmc/pmu-events/pmu-events.h b/lib/libpmc/pmu-events/pmu-events.h index c4c01e20114d..cfc82f20364c 100644 --- a/lib/libpmc/pmu-events/pmu-events.h +++ b/lib/libpmc/pmu-events/pmu-events.h @@ -10,7 +10,6 @@ */ struct pmu_event { const char *name; - const char *alias; const char *event; const char *desc; const char *topic; |