aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 1b85cc1422a9..623094e866fd 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -217,8 +217,8 @@ again:
}
}
-void symbols__fixup_end(struct rb_root_cached *symbols,
- bool is_kallsyms __maybe_unused)
+/* Update zero-sized symbols using the address of the next symbol */
+void symbols__fixup_end(struct rb_root_cached *symbols, bool is_kallsyms)
{
struct rb_node *nd, *prevnd = rb_first_cached(symbols);
struct symbol *curr, *prev;
@@ -232,8 +232,29 @@ void symbols__fixup_end(struct rb_root_cached *symbols,
prev = curr;
curr = rb_entry(nd, struct symbol, rb_node);
- if (prev->end == prev->start || prev->end != curr->start)
- arch__symbols__fixup_end(prev, curr);
+ /*
+ * On some architecture kernel text segment start is located at
+ * some low memory address, while modules are located at high
+ * memory addresses (or vice versa). The gap between end of
+ * kernel text segment and beginning of first module's text
+ * segment is very big. Therefore do not fill this gap and do
+ * not assign it to the kernel dso map (kallsyms).
+ *
+ * In kallsyms, it determines module symbols using '[' character
+ * like in:
+ * ffffffffc1937000 T hdmi_driver_init [snd_hda_codec_hdmi]
+ */
+ if (prev->end == prev->start) {
+ /* Last kernel/module symbol mapped to end of page */
+ if (is_kallsyms && (!strchr(prev->name, '[') !=
+ !strchr(curr->name, '[')))
+ prev->end = roundup(prev->end + 4096, 4096);
+ else
+ prev->end = curr->start;
+
+ pr_debug4("%s sym:%s end:%#" PRIx64 "\n",
+ __func__, prev->name, prev->end);
+ }
}
/* Last entry */
-0500'>2018-04-03drm/amdgpu: Fix memory leaks at amdgpu_init() error pathTakashi Iwai1-4/+5 2018-04-03drm/amdgpu: Fix PCIe lane width calculationAlex Deucher1-2/+2 2018-04-03drm/radeon: Fix PCIe lane width calculationPaul Parsons1-2/+2 2018-04-03drm/amdgpu/si: implement get/set pcie_lanes asic callbackAlex Deucher1-0/+67 2018-04-03drm/amdgpu: Add support for SRBM selection v3Andrey Grodzovsky6-79/+72 2018-04-03Revert "drm/amdgpu: Don't change preferred domian when fallback GTT v5"Chunming Zhou2-17/+17 2018-04-03drm/amd/powerply: fix power reading on FijiEric Huang1-1/+2 2018-04-03drm/amd/powerplay: Enable ACG SS featureKenneth Feng5-18/+39 2018-04-03drm/amdgpu/sdma: fix mask in emit_pipeline_syncAlex Deucher4-4/+4 2018-04-03drm/amdgpu: Fix KIQ hang on bare metal for device unbind/bind back v2.Andrey Grodzovsky1-1/+53 2018-04-03drm/amd/pp: Clean header file in vega12_smumgr.cRex Zhu1-4/+2 2018-04-03drm/amd/pp: Remove Dead functions on Vega12Rex Zhu4-1419/+23 2018-04-03drm/amd/pp: silence a static checker warningDan Carpenter1-4/+4 2018-04-03drm/amdgpu: drop compute ring timeout setting for non-sriov only (v2)Evan Quan1-3/+9 2018-04-03drm/amdgpu: fix typo of domain fallbackChunming Zhou1-1/+1 2018-03-29ALSA: hda - Silence PM ops build warningLukas Wunner1-3/+1 2018-03-27drm/i915: Fix hibernation with ACPI S0 target stateImre Deak2-13/+11 2018-03-27drm/i915/execlists: Use a locked clear_bit() for synchronisation with interruptChris Wilson1-13/+8 2018-03-27drm/i915: Specify which engines to reset following semaphore/event lockupsChris Wilson1-2/+2 2018-03-27drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.Dhinakaran Pandiyan1-5/+2 2018-03-25Linux 4.16-rc7v4.16-rc7Linus Torvalds1-1/+1 2018-03-25tty: vt: fix up tabstops properlyLinus Torvalds1-4/+4 2018-03-24Revert "mqueue: switch to on-demand creation of internal mount"Eric W. Biederman1-55/+19 2018-03-23x86/entry/64: Don't use IST entry for #BP stackAndy Lutomirski3-10/+9 2018-03-23drm/amdkfd: Use ordered workqueue to restore processesFelix Kuehling3-6/+32 2018-03-23drm/amdgpu: Fix acquiring VM on large-BAR systemsFelix Kuehling1-2/+1 2018-03-23x86/efi: Free efi_pgd with free_pages()Waiman Long1-1/+1