var attributeRx … var javaSampleRx … var javaLocationRx … var javaLocationFileLineRx … var javaLocationPathRx … // javaCPUProfile returns a new Profile from profilez data. // b is the profile bytes after the header, period is the profiling // period, and parse is a function to parse 8-byte chunks from the // profile in its native endianness. func javaCPUProfile(b []byte, period int64, parse func(b []byte) (uint64, []byte)) (*Profile, error) { … } // parseJavaProfile returns a new profile from heapz or contentionz // data. b is the profile bytes after the header. func parseJavaProfile(b []byte) (*Profile, error) { … } // parseJavaHeader parses the attribute section on a java profile and // populates a profile. Returns the remainder of the buffer after all // attributes. func parseJavaHeader(pType string, b []byte, p *Profile) ([]byte, error) { … } // parseJavaSamples parses the samples from a java profile and // populates the Samples in a profile. Returns the remainder of the // buffer after the samples. func parseJavaSamples(pType string, b []byte, p *Profile) ([]byte, map[uint64]*Location, error) { … } // parseJavaLocations parses the location information in a java // profile and populates the Locations in a profile. It uses the // location addresses from the profile as both the ID of each // location. func parseJavaLocations(b []byte, locs map[uint64]*Location, p *Profile) error { … }