mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
b89fe63fba
The commit e7ee404757
("perf symbols: Fix symbols searching for module
in buildid-cache") added the function to check kernel modules reside in
the build-id cache. This was because there's no way to identify a DSO
which is actually a kernel module. So it searched linkname of the file
and find ".ko" suffix.
But this does not work for compressed kernel modules and now such DSOs
hCcave correct symtab_type now. So no need to check it anymore. This
patch essentially reverts the commit.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170608073109.30699-10-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
53 lines
1.8 KiB
C
53 lines
1.8 KiB
C
#ifndef PERF_BUILD_ID_H_
|
|
#define PERF_BUILD_ID_H_ 1
|
|
|
|
#define BUILD_ID_SIZE 20
|
|
#define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1)
|
|
|
|
#include "tool.h"
|
|
#include <linux/types.h>
|
|
|
|
extern struct perf_tool build_id__mark_dso_hit_ops;
|
|
struct dso;
|
|
|
|
int build_id__sprintf(const u8 *build_id, int len, char *bf);
|
|
int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id);
|
|
int filename__sprintf_build_id(const char *pathname, char *sbuild_id);
|
|
char *build_id_cache__kallsyms_path(const char *sbuild_id, char *bf,
|
|
size_t size);
|
|
|
|
char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size);
|
|
|
|
int build_id__mark_dso_hit(struct perf_tool *tool, union perf_event *event,
|
|
struct perf_sample *sample, struct perf_evsel *evsel,
|
|
struct machine *machine);
|
|
|
|
int dsos__hit_all(struct perf_session *session);
|
|
|
|
bool perf_session__read_build_ids(struct perf_session *session, bool with_hits);
|
|
int perf_session__write_buildid_table(struct perf_session *session, int fd);
|
|
int perf_session__cache_build_ids(struct perf_session *session);
|
|
|
|
char *build_id_cache__origname(const char *sbuild_id);
|
|
char *build_id_cache__linkname(const char *sbuild_id, char *bf, size_t size);
|
|
char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
|
|
bool is_kallsyms, bool is_vdso);
|
|
|
|
struct strlist;
|
|
|
|
struct strlist *build_id_cache__list_all(bool validonly);
|
|
char *build_id_cache__complement(const char *incomplete_sbuild_id);
|
|
int build_id_cache__list_build_ids(const char *pathname,
|
|
struct strlist **result);
|
|
bool build_id_cache__cached(const char *sbuild_id);
|
|
int build_id_cache__add_s(const char *sbuild_id,
|
|
const char *name, bool is_kallsyms, bool is_vdso);
|
|
int build_id_cache__remove_s(const char *sbuild_id);
|
|
|
|
extern char buildid_dir[];
|
|
|
|
void set_buildid_dir(const char *dir);
|
|
void disable_buildid_cache(void);
|
|
|
|
#endif
|