Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for PCs (0.03 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/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)
  3. 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)
  4. 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)
  5. src/internal/trace/base.go

    			time: s.time,
    		},
    	}
    	e.base.args[0] = uint64(s.stack)
    	return e
    }
    
    // stack represents a goroutine stack sample.
    type stack struct {
    	pcs []uint64
    }
    
    func (s stack) String() string {
    	var sb strings.Builder
    	for _, frame := range s.pcs {
    		fmt.Fprintf(&sb, "\t%#v\n", frame)
    	}
    	return sb.String()
    }
    
    // frame represents a single stack frame.
    type frame struct {
    	pc     uint64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  6. src/runtime/pprof/protomem_test.go

    	"slices"
    	"strings"
    	"testing"
    )
    
    func TestConvertMemProfile(t *testing.T) {
    	addr1, addr2, map1, map2 := testPCs(t)
    
    	// MemProfileRecord stacks are return PCs, so add one to the
    	// addresses recorded in the "profile". The proto profile
    	// locations are call PCs, so conversion will subtract one
    	// from these and get back to addr1 and addr2.
    	a1, a2 := uintptr(addr1)+1, uintptr(addr2)+1
    	rate := int64(512 * 1024)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:45 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  7. src/cmd/pprof/pprof.go

    		if entry.Tag == dwarf.TagSubprogram {
    			ranges, err := f.dwarf.Ranges(entry)
    			if err != nil {
    				return nil
    			}
    			for _, pcs := range ranges {
    				if pcs[0] <= addr && addr < pcs[1] {
    					var ok bool
    					// TODO: AT_linkage_name, AT_MIPS_linkage_name.
    					name, ok = entry.Val(dwarf.AttrName).(string)
    					if ok {
    						break FindName
    					}
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. src/runtime/pprof/protomem.go

    	values := []int64{0, 0, 0, 0}
    	var locs []uint64
    	for _, r := range p {
    		hideRuntime := true
    		for tries := 0; tries < 2; tries++ {
    			stk := r.Stack
    			// For heap profiles, all stack
    			// addresses are return PCs, which is
    			// what appendLocsForStack expects.
    			if hideRuntime {
    				for i, addr := range stk {
    					if f := runtime.FuncForPC(addr); f != nil && strings.HasPrefix(f.Name(), "runtime.") {
    						continue
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:45 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. src/net/http/export_test.go

    // that it's doing so. This is to simulate the server closing connections
    // on the Transport.
    func ExportCloseTransportConnsAbruptly(tr *Transport) {
    	tr.idleMu.Lock()
    	for _, pcs := range tr.idleConn {
    		for _, pc := range pcs {
    			pc.conn.Close()
    		}
    	}
    	tr.idleMu.Unlock()
    }
    
    // ResponseWriterConnForTesting returns w's underlying connection, if w
    // is a regular *response ResponseWriter.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  10. src/internal/trace/parser.go

    	EvBatch             = 1  // start of per-P batch of events [pid, timestamp]
    	EvFrequency         = 2  // contains tracer timer frequency [frequency (ticks per second)]
    	EvStack             = 3  // stack [stack id, number of PCs, array of {PC, func string ID, file string ID, line}]
    	EvGomaxprocs        = 4  // current value of GOMAXPROCS [timestamp, GOMAXPROCS, stack id]
    	EvProcStart         = 5  // start of P [timestamp, thread id]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:31:04 UTC 2024
    - 4.7K bytes
    - Viewed (0)
Back to top