Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for PCs (0.03 sec)

  1. src/runtime/runtime-seh_windows_test.go

    	return sehf4(pan)
    }
    
    //go:noinline
    func sehf4(pan bool) []uintptr {
    	var pcs []uintptr
    	if pan {
    		panic("sehf4")
    	}
    	pcs = sehCallers()
    	return pcs
    }
    
    func testSehCallersEqual(t *testing.T, pcs []uintptr, want []string) {
    	t.Helper()
    	got := make([]string, 0, len(want))
    	for _, pc := range pcs {
    		fn := runtime.FuncForPC(pc)
    		if fn == nil || len(got) >= len(want) {
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 31 16:52:06 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/telemetry/internal/counter/stackcounter.go

    // creating it if necessary.
    func (c *StackCounter) Inc() {
    	pcs := make([]uintptr, c.depth)
    	n := runtime.Callers(2, pcs) // caller of Inc
    	pcs = pcs[:n]
    
    	c.mu.Lock()
    	defer c.mu.Unlock()
    
    	// Existing counter?
    	var ctr *Counter
    	for _, s := range c.stacks {
    		if eq(s.pcs, pcs) {
    			if s.counter != nil {
    				ctr = s.counter
    				break
    			}
    		}
    	}
    
    	if ctr == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:10:54 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. pilot/pkg/model/proxy_config.go

    // the highest priority.
    func mergeWithPrecedence(pcs ...*meshconfig.ProxyConfig) *meshconfig.ProxyConfig {
    	merged := &meshconfig.ProxyConfig{}
    	for i := len(pcs) - 1; i >= 0; i-- {
    		if pcs[i] == nil {
    			continue
    		}
    		proxyConfigYaml, err := protomarshal.ToYAML(pcs[i])
    		if err != nil {
    			continue
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 21 01:23:19 UTC 2023
    - 5K bytes
    - Viewed (0)
  7. src/runtime/start_line_test.go

    			}
    		})
    	}
    }
    
    //go:noinline
    func callerStartLine(wantInlined bool) int {
    	var pcs [1]uintptr
    	n := runtime.Callers(2, pcs[:])
    	if n != 1 {
    		panic(fmt.Sprintf("no caller of callerStartLine? n = %d", n))
    	}
    
    	frames := runtime.CallersFrames(pcs[:])
    	frame, _ := frames.Next()
    
    	inlined := frame.Func == nil // Func always set to nil for inlined frames
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 20 22:54:22 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/util/pkiutil/testing/testing.go

    	}
    }
    
    func newPrivateKey(keyType kubeadmapi.EncryptionAlgorithmType) (crypto.Signer, error) {
    	lock.Lock()
    	defer lock.Unlock()
    
    	var pcs [50]uintptr
    	nCallers := runtime.Callers(2, pcs[:])
    	frames := runtime.CallersFrames(pcs[:nCallers])
    	thisTest := ""
    	for {
    		frame, more := frames.Next()
    		if strings.HasSuffix(frame.File, "_test.go") && testFunction.MatchString(frame.Function) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 21:49:21 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/select.go

    	order := typecheck.TempAt(base.Pos, ir.CurFunc, types.NewArray(types.Types[types.TUINT16], 2*int64(ncas)))
    
    	var pc0, pcs ir.Node
    	if base.Flag.Race {
    		pcs = typecheck.TempAt(base.Pos, ir.CurFunc, types.NewArray(types.Types[types.TUINTPTR], int64(ncas)))
    		pc0 = typecheck.Expr(typecheck.NodAddr(ir.NewIndexExpr(base.Pos, pcs, ir.NewInt(base.Pos, 0))))
    	} else {
    		pc0 = typecheck.NodNil()
    	}
    
    	// register cases
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  10. utils/utils.go

    	}
    	return filepath.ToSlash(s) + "/"
    }
    
    // FileWithLineNum return the file name and line number of the current file
    func FileWithLineNum() string {
    	pcs := [13]uintptr{}
    	// the third caller usually from gorm internal
    	len := runtime.Callers(3, pcs[:])
    	frames := runtime.CallersFrames(pcs[:len])
    	for i := 0; i < len; i++ {
    		// second return value is "more", not "ok"
    		frame, _ := frames.Next()
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 22 06:43:02 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top