[XRay] Update RecordInitializer for PIDRecord
authorDean Michael Berris <dberris@google.com>
Fri, 31 Aug 2018 20:02:55 +0000 (20:02 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 31 Aug 2018 20:02:55 +0000 (20:02 +0000)
Since we changed the storage for the PID in PIDRecord instances, we need
to also update the way we load the data from a DataExtractor through the
RecordInitializer.

llvm-svn: 341243

llvm/lib/XRay/RecordInitializer.cpp

index 11b0710..de4e68b 100644 (file)
@@ -157,7 +157,7 @@ Error RecordInitializer::visit(PIDRecord &R) {
                              OffsetPtr);
 
   auto PreReadOffset = OffsetPtr;
-  R.PID = E.getU64(&OffsetPtr);
+  R.PID = E.getSigned(&OffsetPtr, 4);
   if (PreReadOffset == OffsetPtr)
     return createStringError(std::make_error_code(std::errc::bad_message),
                              "Cannot read a process ID record at offset %d.",