Parcourir la source

Do not attempt to symbolize /dev/dri/* and [heap] files.

Trying to symbolize files like /dev/dri/renderD128 makes pprof hang as
it tries to read from this device file. So do not attempt the symbolization.

Skip [heap] file, too - the profile from issue #78 has a couple samples
in the heap (perhaps some generated code) and trying to locate a file
with that name can't succeed.

Fixes #78.
Alexey Alexandrov il y a 8 ans
Parent
révision
8b9736f013
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      profile/profile.go

+ 1
- 1
profile/profile.go Voir le fichier

@@ -599,7 +599,7 @@ func (p *Profile) HasFileLines() bool {
599 599
 // locations can't be symbolized in principle, at least now.
600 600
 func (m *Mapping) Unsymbolizable() bool {
601 601
 	name := filepath.Base(m.File)
602
-	return name == "[vdso]" || strings.HasPrefix(name, "linux-vdso")
602
+	return name == "[vdso]" || strings.HasPrefix(name, "linux-vdso") || name == "[heap]" || strings.HasPrefix(m.File, "/dev/dri/")
603 603
 }
604 604
 
605 605
 // Copy makes a fully independent copy of a profile.