浏览代码

Add comment for ParseMemoryMapFromScanner

Raul Silvera 8 年前
父节点
当前提交
7f6bc39c1b
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      profile/legacy_profile.go

+ 4
- 0
profile/legacy_profile.go 查看文件

1015
 	return p.ParseMemoryMapFromScanner(bufio.NewScanner(rd))
1015
 	return p.ParseMemoryMapFromScanner(bufio.NewScanner(rd))
1016
 }
1016
 }
1017
 
1017
 
1018
+// ParseMemoryMapFromScanner parses a memory map in the format of
1019
+// /proc/self/maps or a variety of legacy format, and overrides the
1020
+// mappings in the current profile.  It renumbers the samples and
1021
+// locations in the profile correspondingly.
1018
 func (p *Profile) ParseMemoryMapFromScanner(s *bufio.Scanner) error {
1022
 func (p *Profile) ParseMemoryMapFromScanner(s *bufio.Scanner) error {
1019
 	mapping, err := parseProcMapsFromScanner(s)
1023
 	mapping, err := parseProcMapsFromScanner(s)
1020
 	if err != nil {
1024
 	if err != nil {