perf tools: Update copy of libbpf's hashmap.c
[linux-2.6-microblaze.git] / tools / perf / util / map.h
index c2f5d28..b1c0686 100644 (file)
@@ -171,4 +171,18 @@ static inline bool is_bpf_image(const char *name)
        return strncmp(name, "bpf_trampoline_", sizeof("bpf_trampoline_") - 1) == 0 ||
               strncmp(name, "bpf_dispatcher_", sizeof("bpf_dispatcher_") - 1) == 0;
 }
+
+static inline int is_anon_memory(const char *filename)
+{
+       return !strcmp(filename, "//anon") ||
+              !strncmp(filename, "/dev/zero", sizeof("/dev/zero") - 1) ||
+              !strncmp(filename, "/anon_hugepage", sizeof("/anon_hugepage") - 1);
+}
+
+static inline int is_no_dso_memory(const char *filename)
+{
+       return !strncmp(filename, "[stack", 6) ||
+              !strncmp(filename, "/SYSV", 5)  ||
+              !strcmp(filename, "[heap]");
+}
 #endif /* __PERF_MAP_H */