]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/header.c
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / tools / perf / util / header.c
index 314a07151fb772377752dae62658b79ffdc87cd6..b5baff3007bbd477551cc2e62770e534d0919f33 100644 (file)
@@ -841,7 +841,7 @@ static int write_group_desc(int fd, struct perf_header *h __maybe_unused,
 
 /*
  * default get_cpuid(): nothing gets recorded
- * actual implementation must be in arch/$(ARCH)/util/header.c
+ * actual implementation must be in arch/$(SRCARCH)/util/header.c
  */
 int __weak get_cpuid(char *buffer __maybe_unused, size_t sz __maybe_unused)
 {
@@ -1469,8 +1469,16 @@ static int __event_process_build_id(struct build_id_event *bev,
 
                dso__set_build_id(dso, &bev->build_id);
 
-               if (!is_kernel_module(filename, cpumode))
-                       dso->kernel = dso_type;
+               if (dso_type != DSO_TYPE_USER) {
+                       struct kmod_path m = { .name = NULL, };
+
+                       if (!kmod_path__parse_name(&m, filename) && m.kmod)
+                               dso__set_module_info(dso, &m, machine);
+                       else
+                               dso->kernel = dso_type;
+
+                       free(m.name);
+               }
 
                build_id__sprintf(dso->build_id, sizeof(dso->build_id),
                                  sbuild_id);