Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 98 for pcsz (0.04 sec)

  1. test/fixedbugs/issue34123.go

    var x byte
    var p *byte
    
    //go:noinline
    func f() {
    	q := p
    	x = 11  // line 23
    	*q = 12 // line 24
    }
    func main() {
    	defer func() {
    		recover()
    		var pcs [10]uintptr
    		n := runtime.Callers(1, pcs[:])
    		frames := runtime.CallersFrames(pcs[:n])
    		for {
    			f, more := frames.Next()
    			if f.Function == "main.f" && f.Line != 24 {
    				panic(fmt.Errorf("expected line 24, got line %d", f.Line))
    			}
    			if !more {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 08 21:05:17 UTC 2019
    - 735 bytes
    - Viewed (0)
  2. src/internal/pkgbits/sync.go

    // walkFrames calls visit for each call frame represented by pcs.
    //
    // pcs should be a slice of PCs, as returned by runtime.Callers.
    func walkFrames(pcs []uintptr, visit frameVisitor) {
    	if len(pcs) == 0 {
    		return
    	}
    
    	frames := runtime.CallersFrames(pcs)
    	for {
    		frame, more := frames.Next()
    		visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 04 17:12:28 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  3. src/runtime/pprof/proto.go

    }
    
    type locInfo struct {
    	// location id assigned by the profileBuilder
    	id uint64
    
    	// sequence of PCs, including the fake PCs returned by the traceback
    	// to represent inlined functions
    	// https://github.com/golang/go/blob/d6f2f833c93a41ec1c68e49804b8387a06b131c5/src/runtime/traceback.go#L347-L368
    	pcs []uintptr
    
    	// firstPCFrames and firstPCSymbolizeResult hold the results of the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 13 20:40:52 UTC 2023
    - 25.7K bytes
    - Viewed (0)
  4. src/runtime/tracestack.go

    type traceStackTable struct {
    	tab traceMap
    }
    
    // put returns a unique id for the stack trace pcs and caches it in the table,
    // if it sees the trace for the first time.
    func (t *traceStackTable) put(pcs []uintptr) uint64 {
    	if len(pcs) == 0 {
    		return 0
    	}
    	id, _ := t.tab.put(noescape(unsafe.Pointer(&pcs[0])), uintptr(len(pcs))*unsafe.Sizeof(uintptr(0)))
    	return id
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:56 UTC 2024
    - 11K bytes
    - Viewed (0)
  5. src/runtime/example_test.go

    package runtime_test
    
    import (
    	"fmt"
    	"runtime"
    	"strings"
    )
    
    func ExampleFrames() {
    	c := func() {
    		// Ask runtime.Callers for up to 10 PCs, including runtime.Callers itself.
    		pc := make([]uintptr, 10)
    		n := runtime.Callers(0, pc)
    		if n == 0 {
    			// No PCs available. This can happen if the first argument to
    			// runtime.Callers is large.
    			//
    			// Return now to avoid processing the zero Frame that would
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 18 22:05:09 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/stackcheck.go

    	// and following calls.
    	maxLocalHeight := 0
    	relocs, ri := ldr.Relocs(sym), 0
    	pcsp := obj.NewPCIter(uint32(ctxt.Arch.MinLC))
    	for pcsp.Init(ldr.Data(ldr.Pcsp(sym))); !pcsp.Done; pcsp.Next() {
    		// pcsp.value is in effect for [pcsp.pc, pcsp.nextpc).
    		height := int(pcsp.Value)
    		if height > maxLocalHeight {
    			maxLocalHeight = height
    		}
    
    		// Process calls in this span.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 24 16:49:08 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  7. src/runtime/traceback_system_test.go

    //go:noinline
    func child7bad() {
    }
    
    //go:noinline
    func child7() {
    	// Write runtime.Caller's view of the stack to stderr, for debugging.
    	var pcs [16]uintptr
    	n := runtime.Callers(1, pcs[:])
    	fmt.Fprintf(os.Stderr, "Callers: %#x\n", pcs[:n])
    	io.WriteString(os.Stderr, formatStack(pcs[:n]))
    
    	// Cause the crash report to be written to stdout.
    	panic("oops")
    }
    
    // TestTracebackSystem tests that the syntax of crash reports produced
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  8. src/log/slog/example_wrap_test.go

    func Infof(logger *slog.Logger, format string, args ...any) {
    	if !logger.Enabled(context.Background(), slog.LevelInfo) {
    		return
    	}
    	var pcs [1]uintptr
    	runtime.Callers(2, pcs[:]) // skip [Callers, Infof]
    	r := slog.NewRecord(time.Now(), slog.LevelInfo, fmt.Sprintf(format, args...), pcs[0])
    	_ = logger.Handler().Handle(context.Background(), r)
    }
    
    func Example_wrapping() {
    	replace := func(groups []string, a slog.Attr) slog.Attr {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 04 18:32:54 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  9. test/inline_callers.go

    import (
    	"fmt"
    	"runtime"
    )
    
    var skip int
    var npcs int
    var pcs = make([]uintptr, 32)
    
    func f() {
    	g()
    }
    
    func g() {
    	h()
    }
    
    func h() {
    	npcs = runtime.Callers(skip, pcs)
    }
    
    func testCallers(skp int) (frames []string) {
    	skip = skp
    	f()
    	for i := 0; i < npcs; i++ {
    		fn := runtime.FuncForPC(pcs[i] - 1)
    		frames = append(frames, fn.Name())
    		if fn.Name() == "main.main" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 08 21:54:04 UTC 2019
    - 1.9K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/telemetry/internal/crashmonitor/monitor.go

    // and returns this as the name of a counter.
    func telemetryCounterName(crash []byte) (string, error) {
    	pcs, err := parseStackPCs(string(crash))
    	if err != nil {
    		return "", err
    	}
    
    	// Limit the number of frames we request.
    	pcs = pcs[:min(len(pcs), 16)]
    
    	if len(pcs) == 0 {
    		// This can occur if all goroutines are idle, as when
    		// caught in a deadlock, or killed by an async signal
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:57:25 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top