Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for stk (0.02 sec)

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

    //
    // This is a convenience function for easily adding correct
    // stacks to traces.
    func (g *Generation) Stack(stk []trace.StackFrame) uint64 {
    	if len(stk) == 0 {
    		return 0
    	}
    	if len(stk) > 32 {
    		panic("stack too big for test")
    	}
    	var stkc stack
    	copy(stkc.stk[:], stk)
    	stkc.len = len(stk)
    	if id, ok := g.stacks[stkc]; ok {
    		return id
    	}
    	id := uint64(len(g.stacks) + 1)
    	g.stacks[stkc] = id
    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/runtime/pprof/map.go

    	e := &m.free[0]
    	m.free = m.free[1:]
    	e.nextHash = m.hash[h]
    	e.tag = tag
    
    	if len(m.freeStk) < len(stk) {
    		m.freeStk = make([]uintptr, 1024)
    	}
    	// Limit cap to prevent append from clobbering freeStk.
    	e.stk = m.freeStk[:len(stk):len(stk)]
    	m.freeStk = m.freeStk[len(stk):]
    
    	for j := range stk {
    		e.stk[j] = uintptr(stk[j])
    	}
    	if m.hash == nil {
    		m.hash = make(map[uintptr]*profMapEntry)
    	}
    	m.hash[h] = e
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 05 21:51:02 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  3. src/runtime/pprof/mprof_test.go

    	allocateTransient2MInline()
    	allocatePersistent1K()
    	allocateReflect()
    	memSink = nil
    
    	runtime.GC() // materialize stats
    
    	memoryProfilerRun++
    
    	tests := []struct {
    		stk    []string
    		legacy string
    	}{{
    		stk: []string{"runtime/pprof.allocatePersistent1K", "runtime/pprof.TestMemoryProfiler"},
    		legacy: fmt.Sprintf(`%v: %v \[%v: %v\] @ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+ 0x[0-9,a-f]+
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 16 15:20:22 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  4. src/runtime/pprof/protomem.go

    					stk = stk[i:]
    					break
    				}
    			}
    			locs = b.appendLocsForStack(locs[:0], stk)
    			if len(locs) > 0 {
    				break
    			}
    			hideRuntime = false // try again, and show all frames next time.
    		}
    
    		values[0], values[1] = scaleHeapSample(r.AllocObjects, r.AllocBytes, rate)
    		values[2], values[3] = scaleHeapSample(r.InUseObjects(), r.InUseBytes(), rate)
    		var blockSize int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:45 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. src/runtime/testdata/testprogcgo/numgoroutine.go

    	return string(sbuf), true
    }
    
    var callbackok bool
    
    //export CallbackNumGoroutine
    func CallbackNumGoroutine() {
    	stk, ok := checkNumGoroutine("second", 2+baseGoroutines)
    	if !ok {
    		return
    	}
    	if !strings.Contains(stk, "CallbackNumGoroutine") {
    		fmt.Printf("missing CallbackNumGoroutine from stack:\n%s\n", stk)
    		return
    	}
    
    	callbackok = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:52:37 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  6. src/runtime/os_openbsd_syscall.go

    func tfork(param *tforkt, psize uintptr, mm *m, gg *g, fn uintptr) int32
    
    // May run with m.p==nil, so write barriers are not allowed.
    //
    //go:nowritebarrier
    func newosproc(mp *m) {
    	stk := unsafe.Pointer(mp.g0.stack.hi)
    	if false {
    		print("newosproc stk=", stk, " m=", mp, " g=", mp.g0, " id=", mp.id, " ostk=", &mp, "\n")
    	}
    
    	// Stack pointer must point inside stack area (as marked with MAP_STACK),
    	// rather than at the top of it.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 10 20:44:45 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  7. test/fixedbugs/issue22083.go

    	return w.a[i]
    }
    
    func main() {
    	defer func() {
    		e := recover()
    		if e == nil {
    			panic("bounds check didn't fail")
    		}
    		stk := string(debug.Stack())
    		if !strings.Contains(stk, "issue22083.go:40") {
    			panic("wrong stack trace: " + stk)
    		}
    	}()
    	foo := Wrapper{a: []int{0, 1, 2}}
    	_ = foo.Get(0)
    	_ = foo.Get(1)
    	_ = foo.Get(2)
    	_ = foo.Get(3) // stack trace should mention this line
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 03 09:27:37 UTC 2017
    - 791 bytes
    - Viewed (0)
  8. src/runtime/os_netbsd_386.go

    package runtime
    
    import (
    	"internal/abi"
    	"unsafe"
    )
    
    func lwp_mcontext_init(mc *mcontextt, stk unsafe.Pointer, mp *m, gp *g, fn uintptr) {
    	// Machine dependent mcontext initialisation for LWP.
    	mc.__gregs[_REG_EIP] = uint32(abi.FuncPCABI0(lwp_tramp))
    	mc.__gregs[_REG_UESP] = uint32(uintptr(stk))
    	mc.__gregs[_REG_EBX] = uint32(uintptr(unsafe.Pointer(mp)))
    	mc.__gregs[_REG_EDX] = uint32(uintptr(unsafe.Pointer(gp)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 21 22:12:04 UTC 2021
    - 617 bytes
    - Viewed (0)
  9. src/runtime/os_netbsd_amd64.go

    package runtime
    
    import (
    	"internal/abi"
    	"unsafe"
    )
    
    func lwp_mcontext_init(mc *mcontextt, stk unsafe.Pointer, mp *m, gp *g, fn uintptr) {
    	// Machine dependent mcontext initialisation for LWP.
    	mc.__gregs[_REG_RIP] = uint64(abi.FuncPCABI0(lwp_tramp))
    	mc.__gregs[_REG_RSP] = uint64(uintptr(stk))
    	mc.__gregs[_REG_R8] = uint64(uintptr(unsafe.Pointer(mp)))
    	mc.__gregs[_REG_R9] = uint64(uintptr(unsafe.Pointer(gp)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 21 22:12:04 UTC 2021
    - 614 bytes
    - Viewed (0)
  10. src/runtime/runtime_unix_test.go

    			for atomic.LoadUint32(&stop) == 0 {
    				syscall.Close(-1)
    			}
    			wg.Done()
    		}()
    	}
    
    	max := 10000
    	if testing.Short() {
    		max = 100
    	}
    	stk := make([]runtime.StackRecord, 128)
    	for n := 0; n < max; n++ {
    		_, ok := runtime.GoroutineProfile(stk)
    		if !ok {
    			t.Fatalf("GoroutineProfile failed")
    		}
    	}
    
    	// If the program didn't crash, we passed.
    	atomic.StoreUint32(&stop, 1)
    	wg.Wait()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.2K bytes
    - Viewed (0)
Back to top