perf/urgent fixes:
User visible: - Fix copying of /proc/kcore made to the ~/.debug/ DSO cache to allow using objdump with kcore files (Adrian Hunter) - Fix adding perf probes in kernel module functions (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWBVuUAAoJENZQFvNTUqpAracP/02PcPJuBDA54nC96xkVOWQL JlEg9VMjxTBrSelI8DtTAJsHHL/cbql7Knn/smliIwWjLxRzqame5rk4vewxKjDH +8Zo3BFMwB5M4OJ30vqebJjMnP+gngiYd7OPjDmiwxhc3JfDkvicPQcNfOHzuyMY K4wsRpm0ECZRLla+BNiDIjv4BW6qa/yjh19RoQh9/3rocdNVfd7VbTf3UIC+kqqQ AhqRtZXey64yikeIG+GopMnbPCie+vdu1Wd6iWqI/W/u/Buf/9MLheWdsWuorARz HvlOuyrWKGLLLaNyVQ0T9zC98IlbWmcTRDRm4KAAoAwTorlE45OdnVvnuIqyw2IC gt3q+9TyHQbZYiIZ25d9UHXvajp5mszEYg6GiIu7/5kFWrr63QSAp0RWFbF3HjWh tMZa1XVKiDjOEx2tjaZg7elnIydo4JNbt3Dz3gtxcnAK6FH9dXtVY0ia8ChPKm2Q XGtYQqYj+2jzOyFUZbcSfc3HMJyHpuwlOoA4IBMujUx03u4gMHUuu9+dTpWlQ7+R pegCiL/FvdF+L45if8Ep5JNaArscyta2G8AOmXTrsy+c+fOI5/0uN9KzX9SRwdkZ PUQhLx9RhkgSGFOCc2T/n+OT70d7WmxKxuCvnVG7J4L2QIhAUcmCnUyiARj1J2tj JkAlkxTJ7S2cLuIOygwq =3xCd -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix copying of /proc/kcore made to the ~/.debug/ DSO cache to allow using objdump with kcore files. (Adrian Hunter) - Fix adding perf probes in kernel module functions. (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Коммит
2530e39947
|
@ -364,21 +364,6 @@ cyc_thresh Specifies how frequently CYC packets are produced - see cyc
|
|||
|
||||
CYC packets are not requested by default.
|
||||
|
||||
no_force_psb This is a driver option and is not in the IA32_RTIT_CTL MSR.
|
||||
|
||||
It stops the driver resetting the byte count to zero whenever
|
||||
enabling the trace (for example on context switches) which in
|
||||
turn results in no PSB being forced. However some processors
|
||||
will produce a PSB anyway.
|
||||
|
||||
In any case, there is still a PSB when the trace is enabled for
|
||||
the first time.
|
||||
|
||||
no_force_psb can be used to slightly decrease the trace size but
|
||||
may make it harder for the decoder to recover from errors.
|
||||
|
||||
no_force_psb is not selected by default.
|
||||
|
||||
|
||||
new snapshot option
|
||||
-------------------
|
||||
|
|
|
@ -270,12 +270,13 @@ static int kernel_get_module_dso(const char *module, struct dso **pdso)
|
|||
int ret = 0;
|
||||
|
||||
if (module) {
|
||||
list_for_each_entry(dso, &host_machine->dsos.head, node) {
|
||||
if (!dso->kernel)
|
||||
continue;
|
||||
if (strncmp(dso->short_name + 1, module,
|
||||
dso->short_name_len - 2) == 0)
|
||||
goto found;
|
||||
char module_name[128];
|
||||
|
||||
snprintf(module_name, sizeof(module_name), "[%s]", module);
|
||||
map = map_groups__find_by_name(&host_machine->kmaps, MAP__FUNCTION, module_name);
|
||||
if (map) {
|
||||
dso = map->dso;
|
||||
goto found;
|
||||
}
|
||||
pr_debug("Failed to find module %s.\n", module);
|
||||
return -ENOENT;
|
||||
|
|
|
@ -1271,8 +1271,6 @@ out_close:
|
|||
static int kcore__init(struct kcore *kcore, char *filename, int elfclass,
|
||||
bool temp)
|
||||
{
|
||||
GElf_Ehdr *ehdr;
|
||||
|
||||
kcore->elfclass = elfclass;
|
||||
|
||||
if (temp)
|
||||
|
@ -1289,9 +1287,7 @@ static int kcore__init(struct kcore *kcore, char *filename, int elfclass,
|
|||
if (!gelf_newehdr(kcore->elf, elfclass))
|
||||
goto out_end;
|
||||
|
||||
ehdr = gelf_getehdr(kcore->elf, &kcore->ehdr);
|
||||
if (!ehdr)
|
||||
goto out_end;
|
||||
memset(&kcore->ehdr, 0, sizeof(GElf_Ehdr));
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -1348,23 +1344,18 @@ static int kcore__copy_hdr(struct kcore *from, struct kcore *to, size_t count)
|
|||
static int kcore__add_phdr(struct kcore *kcore, int idx, off_t offset,
|
||||
u64 addr, u64 len)
|
||||
{
|
||||
GElf_Phdr gphdr;
|
||||
GElf_Phdr *phdr;
|
||||
GElf_Phdr phdr = {
|
||||
.p_type = PT_LOAD,
|
||||
.p_flags = PF_R | PF_W | PF_X,
|
||||
.p_offset = offset,
|
||||
.p_vaddr = addr,
|
||||
.p_paddr = 0,
|
||||
.p_filesz = len,
|
||||
.p_memsz = len,
|
||||
.p_align = page_size,
|
||||
};
|
||||
|
||||
phdr = gelf_getphdr(kcore->elf, idx, &gphdr);
|
||||
if (!phdr)
|
||||
return -1;
|
||||
|
||||
phdr->p_type = PT_LOAD;
|
||||
phdr->p_flags = PF_R | PF_W | PF_X;
|
||||
phdr->p_offset = offset;
|
||||
phdr->p_vaddr = addr;
|
||||
phdr->p_paddr = 0;
|
||||
phdr->p_filesz = len;
|
||||
phdr->p_memsz = len;
|
||||
phdr->p_align = page_size;
|
||||
|
||||
if (!gelf_update_phdr(kcore->elf, idx, phdr))
|
||||
if (!gelf_update_phdr(kcore->elf, idx, &phdr))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче