Преглед на файлове

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 години
родител
ревизия
48b661dd6c
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3
    2
      profile/profile.go

+ 3
- 2
profile/profile.go Целия файл

@@ -596,10 +596,11 @@ func (p *Profile) HasFileLines() bool {
596 596
 }
597 597
 
598 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 601
 func (m *Mapping) Unsymbolizable() bool {
601 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 606
 // Copy makes a fully independent copy of a profile.