mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 01:26:44 +07:00
perf/urgent fixes.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJPTpj0AAoJENZQFvNTUqpAp0MP/AtR30eyEKl6zKPB6OlegcgY /RF0nIqVz6gCdlERReoF/zIzOQkk/ltHSMhhXgByfSALZJGDFyy3VomnN3ReOE4t dCeQIlNtKYHvT6EbWB5cGWevxS+hGV8C78MQNai7VQuoWGS5FucTgI6XyF4+0WE4 n22elCQszLM6ofC1OqkZ0alfA5ypEe0kN7RVqSdXYBVxPgapj0Sc8u4SlgL/a6pn eb7EnhB7Ue2+bXI3JnPwoy7agqJC/rWgDWb1pYJCc+tGSZ1SG2UAxcasD1syWRgP k8Ocli8oNfdLYguAAyNnifUwMJEGASEEeDo9FtQp5JumI78HpCppfAvQnrJ4jVT1 gGlXt1GLVBw5sgr6cLT77aLVKW48VGJWbzH3ON/R28RK5wuk2wOkPJRHMh6uo3ID lqT12W3T0bRCWWogP5UrWDfMR1zOi5a3ok5nvPjmZiuVygkRph8Cvcmwx36gQRDV rf5+RvoqzxovLolYU50ZaYZkNJQOLMNa7d+TUHS4v9wEdpfDjykOiLZzg/GrBuFR gTslV3zOeHgRwEOXi9dHV6vIITSrshCVOzTzpYqw4/PsXpdjV3LVIWaac5/QByMP xbbjKpgaq2LILwuC/oYyniyB2X3S19E/6xpC7vVr1iPYmiDsSwtNLmgRCaNGE09t yP0XsZezFOnZP4V2lTI3 =OU3v -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Various smaller perf/urgent fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
commit
5d85d97c9f
@ -74,6 +74,7 @@ static pid_t perf_event__get_comm_tgid(pid_t pid, char *comm, size_t len)
|
||||
if (size >= len)
|
||||
size = len - 1;
|
||||
memcpy(comm, name, size);
|
||||
comm[size] = '\0';
|
||||
|
||||
} else if (memcmp(bf, "Tgid:", 5) == 0) {
|
||||
char *tgids = bf + 5;
|
||||
|
@ -349,6 +349,10 @@ struct perf_evsel *perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id)
|
||||
hlist_for_each_entry(sid, pos, head, node)
|
||||
if (sid->id == id)
|
||||
return sid->evsel;
|
||||
|
||||
if (!perf_evlist__sample_id_all(evlist))
|
||||
return list_entry(evlist->entries.next, struct perf_evsel, node);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1867,6 +1867,12 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
|
||||
tev->point.symbol);
|
||||
ret = -ENOENT;
|
||||
goto error;
|
||||
} else if (tev->point.offset > sym->end - sym->start) {
|
||||
pr_warning("Offset specified is greater than size of %s\n",
|
||||
tev->point.symbol);
|
||||
ret = -ENOENT;
|
||||
goto error;
|
||||
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -672,7 +672,7 @@ static int find_variable(Dwarf_Die *sc_die, struct probe_finder *pf)
|
||||
static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr,
|
||||
bool retprobe, struct probe_trace_point *tp)
|
||||
{
|
||||
Dwarf_Addr eaddr;
|
||||
Dwarf_Addr eaddr, highaddr;
|
||||
const char *name;
|
||||
|
||||
/* Copy the name of probe point */
|
||||
@ -683,6 +683,16 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr,
|
||||
dwarf_diename(sp_die));
|
||||
return -ENOENT;
|
||||
}
|
||||
if (dwarf_highpc(sp_die, &highaddr) != 0) {
|
||||
pr_warning("Failed to get end address of %s\n",
|
||||
dwarf_diename(sp_die));
|
||||
return -ENOENT;
|
||||
}
|
||||
if (paddr > highaddr) {
|
||||
pr_warning("Offset specified is greater than size of %s\n",
|
||||
dwarf_diename(sp_die));
|
||||
return -EINVAL;
|
||||
}
|
||||
tp->symbol = strdup(name);
|
||||
if (tp->symbol == NULL)
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user