diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:51:42 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:51:42 +0000 |
commit | 1d5ae1026e831016fc29fd927877c86af904481f (patch) | |
tree | 2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9 /lib/XRay/Profile.cpp | |
parent | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff) |
Notes
Diffstat (limited to 'lib/XRay/Profile.cpp')
-rw-r--r-- | lib/XRay/Profile.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/XRay/Profile.cpp b/lib/XRay/Profile.cpp index e34b182f2e02..c1a43632b600 100644 --- a/lib/XRay/Profile.cpp +++ b/lib/XRay/Profile.cpp @@ -49,9 +49,9 @@ struct BlockHeader { }; static Expected<BlockHeader> readBlockHeader(DataExtractor &Extractor, - uint32_t &Offset) { + uint64_t &Offset) { BlockHeader H; - uint32_t CurrentOffset = Offset; + uint64_t CurrentOffset = Offset; H.Size = Extractor.getU32(&Offset); if (Offset == CurrentOffset) return make_error<StringError>( @@ -76,7 +76,7 @@ static Expected<BlockHeader> readBlockHeader(DataExtractor &Extractor, } static Expected<std::vector<Profile::FuncID>> readPath(DataExtractor &Extractor, - uint32_t &Offset) { + uint64_t &Offset) { // We're reading a sequence of int32_t's until we find a 0. std::vector<Profile::FuncID> Path; auto CurrentOffset = Offset; @@ -94,7 +94,7 @@ static Expected<std::vector<Profile::FuncID>> readPath(DataExtractor &Extractor, } static Expected<Profile::Data> readData(DataExtractor &Extractor, - uint32_t &Offset) { + uint64_t &Offset) { // We expect a certain number of elements for Data: // - A 64-bit CallCount // - A 64-bit CumulativeLocalTime counter @@ -280,7 +280,7 @@ Expected<Profile> loadProfile(StringRef Filename) { StringRef Data(MappedFile.data(), MappedFile.size()); Profile P; - uint32_t Offset = 0; + uint64_t Offset = 0; DataExtractor Extractor(Data, true, 8); // For each block we get from the file: |