Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for newProfBuf (0.19 sec)

  1. src/runtime/profbuf_test.go

    		}
    	}
    
    	myTags := make([]byte, 100)
    	t.Logf("myTags is %p", &myTags[0])
    
    	t.Run("BasicWriteRead", func(t *testing.T) {
    		b := NewProfBuf(2, 11, 1)
    		write(t, b, unsafe.Pointer(&myTags[0]), 1, []uint64{2, 3}, []uintptr{4, 5, 6, 7, 8, 9})
    		read(t, b, []uint64{10, 1, 2, 3, 4, 5, 6, 7, 8, 9}, []unsafe.Pointer{unsafe.Pointer(&myTags[0])})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 20:04:56 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  2. src/runtime/tracecpu.go

    	}
    	// Create new profBuf for CPU samples that will be emitted as events.
    	// Format: after the timestamp, header is [pp.id, gp.goid, mp.procid].
    	trace.cpuLogRead[0] = newProfBuf(3, profBufWordCount, profBufTagCount)
    	trace.cpuLogRead[1] = newProfBuf(3, profBufWordCount, profBufTagCount)
    	// We must not acquire trace.signalLock outside of a signal handler: a
    	// profiling signal may arrive at any time and try to acquire it, leading to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:03:35 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. src/runtime/profbuf.go

    		if int32(overflow) == -1 {
    			break
    		}
    		if b.overflow.CompareAndSwap(overflow, overflow+1) {
    			break
    		}
    	}
    }
    
    // newProfBuf returns a new profiling buffer with room for
    // a header of hdrsize words and a buffer of at least bufwords words.
    func newProfBuf(hdrsize, bufwords, tags int) *profBuf {
    	if min := 2 + hdrsize + 1; bufwords < min {
    		bufwords = min
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  4. src/runtime/cpuprof.go

    		if cpuprof.on || cpuprof.log != nil {
    			print("runtime: cannot set cpu profile rate until previous profile has finished.\n")
    			unlock(&cpuprof.lock)
    			return
    		}
    
    		cpuprof.on = true
    		cpuprof.log = newProfBuf(1, profBufWordCount, profBufTagCount)
    		hdr := [1]uint64{uint64(hz)}
    		cpuprof.log.write(nil, nanotime(), hdr[:], nil)
    		setcpuprofilerate(int32(hz))
    	} else if cpuprof.on {
    		setcpuprofilerate(0)
    		cpuprof.on = false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. src/runtime/export_test.go

    func Fastrand64() uint64        { return rand() }
    func Fastrandn(n uint32) uint32 { return randn(n) }
    
    type ProfBuf profBuf
    
    func NewProfBuf(hdrsize, bufwords, tags int) *ProfBuf {
    	return (*ProfBuf)(newProfBuf(hdrsize, bufwords, tags))
    }
    
    func (p *ProfBuf) Write(tag *unsafe.Pointer, now int64, hdr []uint64, stk []uintptr) {
    	(*profBuf)(p).write(tag, now, hdr, stk)
    }
    
    const (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
Back to top