func BlockProfile(p []BlockProfileRecord) (n int, ok bool) {
	lock(&proflock)
	for b := bbuckets; b != nil; b = b.allnext {
		n++
	}
	if n <= len(p) {
		ok = true
		for b := bbuckets; b != nil; b = b.allnext {
			bp := b.bp()
			r := &p[0]
			r.Count = bp.count
			r.Cycles = bp.cycles
			if raceenabled {
				racewriterangepc(unsafe.Pointer(&r.Stack0[0]), unsafe.Sizeof(r.Stack0), getcallerpc(unsafe.Pointer(&p)), funcPC(BlockProfile))
			}
			if msanenabled {
				msanwrite(unsafe.Pointer(&r.Stack0[0]), unsafe.Sizeof(r.Stack0))
			}
			i := copy(r.Stack0[:], b.stk())
			for ; i < len(r.Stack0); i++ {
				r.Stack0[i] = 0
			}
			p = p[1:]
		}
	}
	unlock(&proflock)
	return
}
// BlockProfile returns n, the number of records in the current blocking profile.
// If len(p) >= n, BlockProfile copies the profile into p and returns n, true.
// If len(p) < n, BlockProfile does not change p and returns n, false.
//
// Most clients should use the runtime/pprof package or
// the testing package's -test.blockprofile flag instead
// of calling BlockProfile directly.
BlockProfile returns n, the number of records in the current blocking profile.
If len(p) >= n, BlockProfile copies the profile into p and returns n, true.
If len(p) < n, BlockProfile does not change p and returns n, false.

Most clients should use the runtime/pprof package or
the testing package's -test.blockprofile flag instead
of calling BlockProfile directly.
// BlockProfile returns n the number of records in the current blocking profile . // If len ( p ) > = n BlockProfile copies the profile into p and returns n true . // If len ( p ) < n BlockProfile does not change p and returns n false . // // Most clients should use the runtime / pprof package or // the testing package ' s - test . blockprofile flag instead // of calling BlockProfile directly .
func BlockProfile(p []BlockProfileRecord) (n int, ok bool) {
	lock(&proflock)
	for b := bbuckets; b != nil; b = b.allnext {
		n++
	}
	if n <= len(p) {
		ok = true
		for b := bbuckets; b != nil; b = b.allnext {
			bp := b.bp()
			r := &p[0]
			r.Count = bp.count
			r.Cycles = bp.cycles
			if raceenabled {
				racewriterangepc(unsafe.Pointer(&r.Stack0[0]), unsafe.Sizeof(r.Stack0), getcallerpc(unsafe.Pointer(&p)), funcPC(BlockProfile))
			}
			if msanenabled {
				msanwrite(unsafe.Pointer(&r.Stack0[0]), unsafe.Sizeof(r.Stack0))
			}
			i := copy(r.Stack0[:], b.stk())
			for ; i < len(r.Stack0); i++ {
				r.Stack0[i] = 0
			}
			p = p[1:]
		}
	}
	unlock(&proflock)
	return
}
func BlockProfile ( p [ ] BlockProfileRecord ) ( n int , ok bool ) { lock ( & proflock ) for b := bbuckets ; b != nil ; b = b . allnext { n ++ } if n <= len ( p ) { ok = true for b := bbuckets ; b != nil ; b = b . allnext { bp := b . bp ( ) r := & p [ 0 ] r . Count = bp . count r . Cycles = bp . cycles if raceenabled { racewriterangepc ( unsafe . Pointer ( & r . Stack0 [ 0 ] ) , unsafe . Sizeof ( r . Stack0 ) , getcallerpc ( unsafe . Pointer ( & p ) ) , funcPC ( BlockProfile ) ) } if msanenabled { msanwrite ( unsafe . Pointer ( & r . Stack0 [ 0 ] ) , unsafe . Sizeof ( r . Stack0 ) ) } i := copy ( r . Stack0 [ : ] , b . stk ( ) ) for ; i < len ( r . Stack0 ) ; i ++ { r . Stack0 [ i ] = 0 } p = p [ 1 : ] } } unlock ( & proflock ) return }
BlockProfile returns n, the number of records in the current blocking profile.
BlockProfile returns n the number of records in the current blocking profile .