Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for AllocateCounters (0.16 sec)

  1. src/internal/coverage/calloc/batchcounteralloc.go

    // live/dead over the same time period, so a good fit for batch
    // allocation.
    
    type BatchCounterAlloc struct {
    	pool []uint32
    }
    
    func (ca *BatchCounterAlloc) AllocateCounters(n int) []uint32 {
    	const chunk = 8192
    	if n > cap(ca.pool) {
    		siz := chunk
    		if n > chunk {
    			siz = n
    		}
    		ca.pool = make([]uint32, siz)
    	}
    	rv := ca.pool[:n]
    	ca.pool = ca.pool[n:]
    	return rv
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 11:47:16 UTC 2022
    - 754 bytes
    - Viewed (0)
  2. src/internal/coverage/cfile/testsupport.go

    				// Note: no overflow reporting here.
    				if err, _ := ts.cm.MergeCounters(data.Counters, prev); err != nil {
    					return fmt.Errorf("processing counter data file %s: %v", cdf, err)
    				}
    			}
    			c := ts.AllocateCounters(len(data.Counters))
    			copy(c, data.Counters)
    			pmm[key] = c
    		}
    		return nil
    	}
    
    	// Read counter data files.
    	for _, cdf := range p.CounterDataFiles {
    		if err := readcdf(cdf); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. src/cmd/covdata/dump.go

    	if len(val.Counters) < len(data.Counters) {
    		t := val.Counters
    		val.Counters = d.AllocateCounters(len(data.Counters))
    		copy(val.Counters, t)
    	}
    	err, overflow := d.cm.MergeCounters(val.Counters, data.Counters)
    	if err != nil {
    		fatal("%v", err)
    	}
    	if overflow {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 11:36:57 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  4. src/cmd/covdata/metamerge.go

    	if *verbflag > 4 {
    		fmt.Printf("visit pk=%d fid=%d len(counters)=%d\n", data.PkgIdx, data.FuncIdx, len(data.Counters))
    	}
    	if len(val.Counters) < len(data.Counters) {
    		t := val.Counters
    		val.Counters = mm.AllocateCounters(len(data.Counters))
    		copy(val.Counters, t)
    	}
    	err, overflow := mm.MergeCounters(val.Counters, data.Counters)
    	if err != nil {
    		fatal("%v", err)
    	}
    	if overflow {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 12 17:17:47 UTC 2024
    - 12.1K bytes
    - Viewed (0)
Back to top