Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for stack_frame (0.14 sec)

  1. src/internal/trace/internal/testgen/go122/trace.go

    		}
    	}
    	return raw.Event{
    		Version: version.Go122,
    		Ev:      ev,
    		Args:    args,
    		Data:    data,
    	}
    }
    
    type stack struct {
    	stk [32]trace.StackFrame
    	len int
    }
    
    var (
    	NoString = ""
    	NoStack  = []trace.StackFrame{}
    )
    
    // Generation represents a single generation in the trace.
    type Generation struct {
    	trace   *Trace
    	gen     uint64
    	batches []*Batch
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  2. src/cmd/trace/viewer.go

    // used to store the frames to reduce allocations.
    func viewerFrames(stk trace.Stack) []*trace.Frame {
    	var frames []*trace.Frame
    	stk.Frames(func(f trace.StackFrame) bool {
    		frames = append(frames, &trace.Frame{
    			PC:   f.PC,
    			Fn:   f.Func,
    			File: f.File,
    			Line: int(f.Line),
    		})
    		return true
    	})
    	return frames
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. src/cmd/trace/regions.go

    type regionFingerprint struct {
    	Frame trace.StackFrame
    	Type  string
    }
    
    func fingerprintRegion(r *trace.UserRegionSummary) regionFingerprint {
    	return regionFingerprint{
    		Frame: regionTopStackFrame(r),
    		Type:  r.Name,
    	}
    }
    
    func regionTopStackFrame(r *trace.UserRegionSummary) trace.StackFrame {
    	var frame trace.StackFrame
    	if r.Start != nil && r.Start.Stack() != trace.NoStack {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  4. src/runtime/trace_cgo_test.go

    	}
    	return candidates[0]
    }
    
    // dumpStack returns e.Stack() as a string.
    func dumpStackV2(e *trace.Event) string {
    	var buf bytes.Buffer
    	e.Stack().Frames(func(f trace.StackFrame) bool {
    		file := strings.TrimPrefix(f.File, runtime.GOROOT())
    		fmt.Fprintf(&buf, "%s\n\t%s:%d\n", f.Func, file, f.Line)
    		return true
    	})
    	return buf.String()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. src/internal/trace/event.go

    	table *evTable
    	id    stackID
    }
    
    // Frames is an iterator over the frames in a Stack.
    func (s Stack) Frames(yield func(f StackFrame) bool) bool {
    	if s.id == 0 {
    		return true
    	}
    	stk := s.table.stacks.mustGet(s.id)
    	for _, pc := range stk.pcs {
    		f := s.table.pcs[pc]
    		sf := StackFrame{
    			PC:   f.pc,
    			Func: s.table.strings.mustGet(f.funcID),
    			File: s.table.strings.mustGet(f.fileID),
    			Line: f.line,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 12:39:00 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  6. src/cmd/trace/pprof.go

    func (m *stackMap) profile() []traceviewer.ProfileRecord {
    	prof := make([]traceviewer.ProfileRecord, 0, len(m.stacks))
    	for stack, record := range m.stacks {
    		rec := *record
    		i := 0
    		stack.Frames(func(frame trace.StackFrame) bool {
    			rec.Stack = append(rec.Stack, &trace.Frame{
    				PC:   frame.PC,
    				Fn:   frame.Func,
    				File: frame.File,
    				Line: int(frame.Line),
    			})
    			i++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  7. src/cmd/trace/jsontrace_test.go

    // at the root of the stack trace is named name.
    func filterStackRootFunc(name string) eventFilterFn {
    	return func(e *format.Event, data *format.Data) bool {
    		frames := stackFrames(data, e.Stack)
    		rootFrame := frames[len(frames)-1]
    		return strings.HasPrefix(rootFrame, name+":")
    	}
    }
    
    // filterViewerTrace returns a copy of data with only the events that pass all
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  8. src/cmd/trace/gstate.go

    			endTime:    ts,
    			startStack: r.stack,
    			endStack:   stack,
    		})
    	}
    	delete(gs.activeRanges, name)
    }
    
    func lastFunc(s trace.Stack) string {
    	var last trace.StackFrame
    	s.Frames(func(f trace.StackFrame) bool {
    		last = f
    		return true
    	})
    	return last.Func
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  9. src/internal/trace/trace_test.go

    			if ev.Kind() == trace.EventStackSample {
    				totalTraceSamples++
    				if hogRegion != nil && ev.Goroutine() == hogRegion.Goroutine() {
    					traceSamples++
    					var fns []string
    					ev.Stack().Frames(func(frame trace.StackFrame) bool {
    						if frame.Func != "runtime.goexit" {
    							fns = append(fns, fmt.Sprintf("%s:%d", frame.Func, frame.Line))
    						}
    						return true
    					})
    					stack := strings.Join(fns, "|")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  10. src/internal/trace/summary.go

    			// goroutine, because it represents its immutable start point.
    			if g.Name == "" {
    				stk := st.Stack
    				if stk != NoStack {
    					var frame StackFrame
    					var ok bool
    					stk.Frames(func(f StackFrame) bool {
    						frame = f
    						ok = true
    						return true
    					})
    					if ok {
    						// NB: this PC won't actually be consistent for
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 20.7K bytes
    - Viewed (0)
Back to top