From: Cody P Schafer Date: Fri, 10 Aug 2012 22:22:47 +0000 (-0700) Subject: perf symbols: Correct comment wrt kallsyms loading X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=72f86204419e1b83f18b9bc2c97141a52dc534d2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf symbols: Correct comment wrt kallsyms loading In kallsyms_parse() when calling process_symbol() (a callback argument to kallsyms_parse()), we pass start as both start & end (ie: start=start, end=start). In map__process_kallsym_symbol(), the length is calculated as 'end - start + 1', making the length 1, not 0. Essentially, start & end define an inclusive range. Signed-off-by: Cody P Schafer Cc: David Hansen Cc: Ingo Molnar Cc: Matt Hellsley Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Link: http://lkml.kernel.org/r/1344637382-22789-2-git-send-email-cody@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 42c0d943f94f..9f181a86f3b2 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -605,7 +605,7 @@ int kallsyms__parse(const char *filename, void *arg, /* * module symbols are not sorted so we add all - * symbols with zero length and rely on + * symbols, setting length to 1, and rely on * symbols__fixup_end() to fix it up. */ err = process_symbol(arg, symbol_name,