Bläddra i källkod

Make [vsyscall] recognized as a not symbolizable mapping.

Do so by relaxing the matching to treat all mappings for file names
starting with a '[' as not symbolizable.
Alexey Alexandrov 8 år sedan
förälder
incheckning
48b661dd6c
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3
    2
      profile/profile.go

+ 3
- 2
profile/profile.go Visa fil

596
 }
596
 }
597
 
597
 
598
 // Unsymbolizable returns true if a mapping points to a binary for which
598
 // Unsymbolizable returns true if a mapping points to a binary for which
599
-// locations can't be symbolized in principle, at least now.
599
+// locations can't be symbolized in principle, at least now. Examples are
600
+// "[vdso]", [vsyscall]" and some others, see the code.
600
 func (m *Mapping) Unsymbolizable() bool {
601
 func (m *Mapping) Unsymbolizable() bool {
601
 	name := filepath.Base(m.File)
602
 	name := filepath.Base(m.File)
602
-	return name == "[vdso]" || strings.HasPrefix(name, "linux-vdso") || name == "[heap]" || strings.HasPrefix(m.File, "/dev/dri/")
603
+	return strings.HasPrefix(name, "[") || strings.HasPrefix(name, "linux-vdso") || strings.HasPrefix(m.File, "/dev/dri/")
603
 }
604
 }
604
 
605
 
605
 // Copy makes a fully independent copy of a profile.
606
 // Copy makes a fully independent copy of a profile.