Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for parseProcSelfMaps (0.22 sec)

  1. src/runtime/pprof/proto_other.go

    // It saves the address ranges of the mappings in b.mem for use
    // when emitting locations.
    func (b *profileBuilder) readMapping() {
    	data, _ := os.ReadFile("/proc/self/maps")
    	parseProcSelfMaps(data, b.addMapping)
    	if len(b.mem) == 0 { // pprof expects a map entry, so fake one.
    		b.addMappingEntry(0, 0, 0, "", "", true)
    		// TODO(hyangah): make addMapping return *memMap or
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 16:07:59 UTC 2023
    - 928 bytes
    - Viewed (0)
  2. src/runtime/pprof/proto_test.go

    		// Figure out two addresses from /proc/self/maps.
    		mmap, err := os.ReadFile("/proc/self/maps")
    		if err != nil {
    			t.Fatal(err)
    		}
    		var mappings []*profile.Mapping
    		id := uint64(1)
    		parseProcSelfMaps(mmap, func(lo, hi, offset uint64, file, buildID string) {
    			mappings = append(mappings, &profile.Mapping{
    				ID:      id,
    				Start:   lo,
    				Limit:   hi,
    				Offset:  offset,
    				File:    file,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 23:21:53 UTC 2024
    - 17K bytes
    - Viewed (0)
  3. src/runtime/pprof/proto.go

    		b.pb.int64Opt(tagFunction_StartLine, fn.startLine)
    		b.pb.endMessage(tagProfile_Function, start)
    	}
    
    	b.flush()
    	return id
    }
    
    var space = []byte(" ")
    var newline = []byte("\n")
    
    func parseProcSelfMaps(data []byte, addMapping func(lo, hi, offset uint64, file, buildID string)) {
    	// $ cat /proc/self/maps
    	// 00400000-0040b000 r-xp 00000000 fc:01 787766                             /bin/cat
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 13 20:40:52 UTC 2023
    - 25.7K bytes
    - Viewed (0)
Back to top