mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-16 01:24:08 +08:00
perf/core improvements and fixes:
User visible: - Fix to free temporal Dwarf_Frame correctly in 'perf probe', fixing a regression introduced in perf/core that prevented, at least, adding an uprobe collecting function parameter values (Masami Hiramatsu) - Fix output of %llu for 64 bit values read on 32 bit machines in libtraceevent (Steven Rostedt) Developer visible: - Clean CFLAGS and LDFLAGS for fixdep in tools/build (Wang Nan) - Don't do a feature check when cleaning tools/lib/bpf (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWVg+BAAoJENZQFvNTUqpAOeQQAJdjbCbpbkvI0z24I+ubBwfK SFTUtM4Q+yzQ0vEQwW17EqAuDwyiVHO4X3TuKDytpKE03xskFzvZvskFcG6uXKS3 gwmokFoxgcCPIJAdZ9RpFzPNmv7el0ueXJe1D4+C1Tfna8WprFf5S6x5IMsh6GFK LvkLsfhKe67W6xlgu8BVdWZghI5R7clBM3jJAAg8M6TYg91wLq/bdNFIp/7TJEt4 d00h3SccwK3jM1mg222x3Hx7dSHXz9NDVEtZ2a5IbH0DNM5KggVHvzfuqf9FqxzA UtwFNxLleh/a9exJDKflW7mhL961sJZNzR1aJcdG/WHrChBpnNVcj+5vFf9U8k/l /AOPFZTw48PcEAh5AKbJLbsIe1Tsky2rEw15yBcMToSbkH89ABAQs2Am3iZURioL 0G2+ItY54TOc5JCtS5XdFlBji2Ifwddn05cA9S50TUayD+bU0WDz2cwQk4u6AKna owhVFQLDtALld13QJD93Lj0NIIHp+ViEvwyhP9OXuncT4brJybJbnQDjPcEMpW3z Eh/tLJPv8v49+G3w5mzJVqTsf4TgTUhHetZuM+p5b8NmbRP1fcVp7ZPL7MouPrZO /EqzokDKkPV5jlmCORfs9YSYM4FD5jxPzohi2lbrsF98yV6NLp7VpTn7wxXyMvxt Dd0HRJ1Z342jPWVHkLBS =0fcy -----END PGP SIGNATURE----- Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Fix to free temporal Dwarf_Frame correctly in 'perf probe', fixing a regression introduced in perf/core that prevented, at least, adding an uprobe collecting function parameter values (Masami Hiramatsu) - Fix output of %llu for 64 bit values read on 32 bit machines in libtraceevent (Steven Rostedt) Developer visible: - Clean CFLAGS and LDFLAGS for fixdep in tools/build (Wang Nan) - Don't do a feature check when cleaning tools/lib/bpf (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
a95a49fa0c
@ -4,7 +4,7 @@ ifdef CROSS_COMPILE
|
||||
fixdep:
|
||||
else
|
||||
fixdep:
|
||||
$(Q)$(MAKE) -C $(srctree)/tools/build fixdep
|
||||
$(Q)$(MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= fixdep
|
||||
endif
|
||||
|
||||
.PHONY: fixdep
|
||||
|
@ -71,7 +71,17 @@ FEATURE_DISPLAY = libelf bpf
|
||||
INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi
|
||||
FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
|
||||
|
||||
check_feat := 1
|
||||
NON_CHECK_FEAT_TARGETS := clean TAGS tags cscope help
|
||||
ifdef MAKECMDGOALS
|
||||
ifeq ($(filter-out $(NON_CHECK_FEAT_TARGETS),$(MAKECMDGOALS)),)
|
||||
check_feat := 0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(check_feat),1)
|
||||
include $(srctree)/tools/build/Makefile.feature
|
||||
endif
|
||||
|
||||
export prefix libdir src obj
|
||||
|
||||
|
@ -4968,13 +4968,12 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
|
||||
sizeof(long) != 8) {
|
||||
char *p;
|
||||
|
||||
ls = 2;
|
||||
/* make %l into %ll */
|
||||
p = strchr(format, 'l');
|
||||
if (p)
|
||||
if (ls == 1 && (p = strchr(format, 'l')))
|
||||
memmove(p+1, p, strlen(p)+1);
|
||||
else if (strcmp(format, "%p") == 0)
|
||||
strcpy(format, "0x%llx");
|
||||
ls = 2;
|
||||
}
|
||||
switch (ls) {
|
||||
case -2:
|
||||
|
@ -654,6 +654,7 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,
|
||||
static int call_probe_finder(Dwarf_Die *sc_die, struct probe_finder *pf)
|
||||
{
|
||||
Dwarf_Attribute fb_attr;
|
||||
Dwarf_Frame *frame = NULL;
|
||||
size_t nops;
|
||||
int ret;
|
||||
|
||||
@ -683,26 +684,24 @@ static int call_probe_finder(Dwarf_Die *sc_die, struct probe_finder *pf)
|
||||
ret = dwarf_getlocation_addr(&fb_attr, pf->addr, &pf->fb_ops, &nops, 1);
|
||||
if (ret <= 0 || nops == 0) {
|
||||
pf->fb_ops = NULL;
|
||||
ret = 0;
|
||||
#if _ELFUTILS_PREREQ(0, 142)
|
||||
} else if (nops == 1 && pf->fb_ops[0].atom == DW_OP_call_frame_cfa &&
|
||||
pf->cfi != NULL) {
|
||||
Dwarf_Frame *frame = NULL;
|
||||
if (dwarf_cfi_addrframe(pf->cfi, pf->addr, &frame) != 0 ||
|
||||
dwarf_frame_cfa(frame, &pf->fb_ops, &nops) != 0) {
|
||||
pr_warning("Failed to get call frame on 0x%jx\n",
|
||||
(uintmax_t)pf->addr);
|
||||
ret = -ENOENT;
|
||||
}
|
||||
free(frame);
|
||||
return -ENOENT;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Call finder's callback handler */
|
||||
if (ret >= 0)
|
||||
ret = pf->callback(sc_die, pf);
|
||||
|
||||
/* *pf->fb_ops will be cached in libdw. Don't free it. */
|
||||
/* Since *pf->fb_ops can be a part of frame. we should free it here. */
|
||||
free(frame);
|
||||
pf->fb_ops = NULL;
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user