File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99#include <stdbool.h>
1010#include <stdio.h>
1111#include <linux/bitops.h>
12+ #include <string.h>
1213#include "build-id.h"
1314#include "debuginfo.h"
1415#include "mutex.h"
@@ -20,6 +21,7 @@ struct perf_env;
2021
2122#define DSO__NAME_KALLSYMS "[kernel.kallsyms]"
2223#define DSO__NAME_KCORE "[kernel.kcore]"
24+ #define DSO__NAME_GUEST_KALLSYMS "[guest.kernel.kallsyms"
2325
2426/**
2527 * enum dso_binary_type - The kind of DSO generally associated with a memory
@@ -915,6 +917,14 @@ static inline bool dso__is_kallsyms(const struct dso *dso)
915917{
916918 enum dso_binary_type bt = dso__binary_type (dso );
917919
920+ if (bt == DSO_BINARY_TYPE__NOT_FOUND ) {
921+ return RC_CHK_ACCESS (dso )-> kernel &&
922+ ((strncmp (RC_CHK_ACCESS (dso )-> long_name , DSO__NAME_KALLSYMS ,
923+ strlen (DSO__NAME_KALLSYMS )) == 0 ) ||
924+ (strncmp (RC_CHK_ACCESS (dso )-> long_name , DSO__NAME_GUEST_KALLSYMS ,
925+ strlen (DSO__NAME_GUEST_KALLSYMS )) == 0 ));
926+ }
927+
918928 return bt == DSO_BINARY_TYPE__KALLSYMS || bt == DSO_BINARY_TYPE__GUEST_KALLSYMS ;
919929}
920930
You can’t perform that action at this time.
0 commit comments