Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for PCs (0.02 sec)

  1. 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)
  2. src/cmd/trace/pprof.go

    		return rec
    	}
    	// Slow path: the stack may still be in the map.
    
    	// Grab the stack's PCs as the source-of-truth.
    	var pcs [pprofMaxStack]uint64
    	pcsForStack(stack, &pcs)
    
    	// Check the source-of-truth.
    	var rec *traceviewer.ProfileRecord
    	if existing, ok := m.pcs[pcs]; ok {
    		// In the map.
    		rec = m.stacks[existing]
    		delete(m.stacks, existing)
    	} else {
    		// Not in the map.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  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. 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)
  7. src/internal/trace/generation.go

    			}
    			frames = append(frames, pc)
    
    			if _, ok := pcs[pc]; !ok {
    				pcs[pc] = frame{
    					pc:     pc,
    					funcID: stringID(funcID),
    					fileID: stringID(fileID),
    					line:   line,
    				}
    			}
    		}
    
    		// Add the stack to the map.
    		if err := stackTable.insert(stackID(id), stack{pcs: frames}); err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 22:14:45 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  8. src/runtime/select.go

    	// statements in packages compiled without -race (e.g.,
    	// ensureSigM in runtime/signal_unix.go).
    	var pcs []uintptr
    	if raceenabled && pc0 != nil {
    		pc1 := (*[1 << 16]uintptr)(unsafe.Pointer(pc0))
    		pcs = pc1[:ncases:ncases]
    	}
    	casePC := func(casi int) uintptr {
    		if pcs == nil {
    			return 0
    		}
    		return pcs[casi]
    	}
    
    	var t0 int64
    	if blockprofilerate > 0 {
    		t0 = cputicks()
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K bytes
    - Viewed (0)
  9. 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)
  10. src/runtime/pprof/pprof_test.go

    	return cpuHog0(x, n)
    }
    
    //go:noinline
    func dumpCallers(pcs []uintptr) {
    	if pcs == nil {
    		return
    	}
    
    	skip := 2 // Callers and dumpCallers
    	runtime.Callers(skip, pcs)
    }
    
    //go:noinline
    func inlinedCallerDump(pcs []uintptr) {
    	inlinedCalleeDump(pcs)
    }
    
    func inlinedCalleeDump(pcs []uintptr) {
    	dumpCallers(pcs)
    }
    
    type inlineWrapperInterface interface {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
Back to top