...

Package rtcov

import "internal/coverage/rtcov"
Overview
Index

Overview ▾

type CovCounterBlob

CovCounterBlob is a container for encapsulating a counter section (BSS variable) for an instrumented Go module. Here "counters" points to the counter payload and "len" is the number of uint32 entries in the section.

type CovCounterBlob struct {
    Counters *uint32
    Len      uint64
}

type CovMetaBlob

CovMetaBlob is a container for holding the meta-data symbol (an RODATA variable) for an instrumented Go package. Here "p" points to the symbol itself, "len" is the length of the sym in bytes, and "hash" is an md5sum for the sym computed by the compiler. When the init function for a coverage-instrumented package executes, it will make a call into the runtime which will create a covMetaBlob object for the package and chain it onto a global list.

type CovMetaBlob struct {
    P                  *byte
    Len                uint32
    Hash               [16]byte
    PkgPath            string
    PkgID              int
    CounterMode        uint8 // coverage.CounterMode
    CounterGranularity uint8 // coverage.CounterGranularity
}