diff options
| author | 2019-11-24 01:04:35 +0900 | |
|---|---|---|
| committer | 2019-11-25 21:03:33 +0900 | |
| commit | 29e55ad3d5f50eca6f8762749da85d6fa1250061 (patch) | |
| tree | 87bea5c6a8ef1c9a652a51dcf3a05086e59af031 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | scripts/kallsyms: remove unneeded length check for prefix matching (diff) | |
| download | linux-rng-29e55ad3d5f50eca6f8762749da85d6fa1250061.tar.xz linux-rng-29e55ad3d5f50eca6f8762749da85d6fa1250061.zip | |
scripts/kallsyms: add sym_name() to mitigate cast ugliness
sym_entry::sym is (unsigned char *) instead of (char *) because
kallsyms exploits the MSB for compression, and the characters are
used as the index of token_profit array.
However, it requires casting (unsigned char *) to (char *) in some
places since standard library functions such as strcmp(), strlen()
expect (char *).
Introduce a new helper, sym_name(), which advances the given pointer
by 1 and casts it to (char *).
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
