reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/XRay/RecordInitializer.cpp
   14   if (!E.isValidOffsetForDataOfSize(OffsetPtr, sizeof(uint64_t)))
   17         "Invalid offset for a buffer extent (%" PRId64 ").", OffsetPtr);
   19   auto PreReadOffset = OffsetPtr;
   20   R.Size = E.getU64(&OffsetPtr);
   21   if (PreReadOffset == OffsetPtr)
   24                              OffsetPtr);
   26   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
   26   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
   31   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
   35         "Invalid offset for a wallclock record (%" PRId64 ").", OffsetPtr);
   36   auto BeginOffset = OffsetPtr;
   37   auto PreReadOffset = OffsetPtr;
   38   R.Seconds = E.getU64(&OffsetPtr);
   39   if (OffsetPtr == PreReadOffset)
   43         OffsetPtr);
   45   PreReadOffset = OffsetPtr;
   46   R.Nanos = E.getU32(&OffsetPtr);
   47   if (OffsetPtr == PreReadOffset)
   51         OffsetPtr);
   54   assert(OffsetPtr - BeginOffset <= MetadataRecord::kMetadataBodySize);
   55   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
   55   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
   60   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
   64         "Invalid offset for a new cpu id record (%" PRId64 ").", OffsetPtr);
   65   auto BeginOffset = OffsetPtr;
   66   auto PreReadOffset = OffsetPtr;
   67   R.CPUId = E.getU16(&OffsetPtr);
   68   if (OffsetPtr == PreReadOffset)
   71                              OffsetPtr);
   73   PreReadOffset = OffsetPtr;
   74   R.TSC = E.getU64(&OffsetPtr);
   75   if (OffsetPtr == PreReadOffset)
   78                              OffsetPtr);
   80   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
   80   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
   85   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
   89         "Invalid offset for a new TSC wrap record (%" PRId64 ").", OffsetPtr);
   91   auto PreReadOffset = OffsetPtr;
   92   R.BaseTSC = E.getU64(&OffsetPtr);
   93   if (PreReadOffset == OffsetPtr)
   96         "Cannot read TSC wrap record at offset %" PRId64 ".", OffsetPtr);
   98   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
   98   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
  103   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
  107         "Invalid offset for a custom event record (%" PRId64 ").", OffsetPtr);
  109   auto BeginOffset = OffsetPtr;
  110   auto PreReadOffset = OffsetPtr;
  111   R.Size = E.getSigned(&OffsetPtr, sizeof(int32_t));
  112   if (PreReadOffset == OffsetPtr)
  116         OffsetPtr);
  122         R.Size, OffsetPtr);
  124   PreReadOffset = OffsetPtr;
  125   R.TSC = E.getU64(&OffsetPtr);
  126   if (PreReadOffset == OffsetPtr)
  130         OffsetPtr);
  135     PreReadOffset = OffsetPtr;
  136     R.CPU = E.getU16(&OffsetPtr);
  137     if (PreReadOffset == OffsetPtr)
  140           "Missing CPU field at offset %" PRId64 ".", OffsetPtr);
  143   assert(OffsetPtr > BeginOffset &&
  144          OffsetPtr - BeginOffset <= MetadataRecord::kMetadataBodySize);
  145   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
  145   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
  148   if (!E.isValidOffsetForDataOfSize(OffsetPtr, R.Size))
  152         R.Size, OffsetPtr);
  156   PreReadOffset = OffsetPtr;
  157   if (E.getU8(&OffsetPtr, Buffer.data(), R.Size) != Buffer.data())
  161         R.Size, OffsetPtr);
  163   assert(OffsetPtr >= PreReadOffset);
  164   if (OffsetPtr - PreReadOffset != static_cast<uint32_t>(R.Size))
  169         OffsetPtr - PreReadOffset, R.Size, PreReadOffset);
  176   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
  180         "Invalid offset for a custom event record (%" PRId64 ").", OffsetPtr);
  182   auto BeginOffset = OffsetPtr;
  183   auto PreReadOffset = OffsetPtr;
  185   R.Size = E.getSigned(&OffsetPtr, sizeof(int32_t));
  186   if (PreReadOffset == OffsetPtr)
  190         OffsetPtr);
  196         R.Size, OffsetPtr);
  198   PreReadOffset = OffsetPtr;
  199   R.Delta = E.getSigned(&OffsetPtr, sizeof(int32_t));
  200   if (PreReadOffset == OffsetPtr)
  205         OffsetPtr);
  207   assert(OffsetPtr > BeginOffset &&
  208          OffsetPtr - BeginOffset <= MetadataRecord::kMetadataBodySize);
  209   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
  209   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
  212   if (!E.isValidOffsetForDataOfSize(OffsetPtr, R.Size))
  216         R.Size, OffsetPtr);
  220   PreReadOffset = OffsetPtr;
  221   if (E.getU8(&OffsetPtr, Buffer.data(), R.Size) != Buffer.data())
  225         R.Size, OffsetPtr);
  227   assert(OffsetPtr >= PreReadOffset);
  228   if (OffsetPtr - PreReadOffset != static_cast<uint32_t>(R.Size))
  233         OffsetPtr - PreReadOffset, R.Size, PreReadOffset);
  240   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
  244         "Invalid offset for a typed event record (%" PRId64 ").", OffsetPtr);
  246   auto BeginOffset = OffsetPtr;
  247   auto PreReadOffset = OffsetPtr;
  249   R.Size = E.getSigned(&OffsetPtr, sizeof(int32_t));
  250   if (PreReadOffset == OffsetPtr)
  254         OffsetPtr);
  260         R.Size, OffsetPtr);
  262   PreReadOffset = OffsetPtr;
  263   R.Delta = E.getSigned(&OffsetPtr, sizeof(int32_t));
  264   if (PreReadOffset == OffsetPtr)
  269         OffsetPtr);
  271   PreReadOffset = OffsetPtr;
  272   R.EventType = E.getU16(&OffsetPtr);
  273   if (PreReadOffset == OffsetPtr)
  277         OffsetPtr);
  279   assert(OffsetPtr > BeginOffset &&
  280          OffsetPtr - BeginOffset <= MetadataRecord::kMetadataBodySize);
  281   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
  281   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - BeginOffset);
  284   if (!E.isValidOffsetForDataOfSize(OffsetPtr, R.Size))
  288         R.Size, OffsetPtr);
  292   PreReadOffset = OffsetPtr;
  293   if (E.getU8(&OffsetPtr, Buffer.data(), R.Size) != Buffer.data())
  297         R.Size, OffsetPtr);
  299   assert(OffsetPtr >= PreReadOffset);
  300   if (OffsetPtr - PreReadOffset != static_cast<uint32_t>(R.Size))
  305         OffsetPtr - PreReadOffset, R.Size, PreReadOffset);
  312   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
  317         OffsetPtr);
  319   auto PreReadOffset = OffsetPtr;
  320   R.Arg = E.getU64(&OffsetPtr);
  321   if (PreReadOffset == OffsetPtr)
  324         "Cannot read a call arg record at offset %" PRId64 ".", OffsetPtr);
  326   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
  326   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
  331   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
  335         "Invalid offset for a process ID record (%" PRId64 ").", OffsetPtr);
  337   auto PreReadOffset = OffsetPtr;
  338   R.PID = E.getSigned(&OffsetPtr, 4);
  339   if (PreReadOffset == OffsetPtr)
  342         "Cannot read a process ID record at offset %" PRId64 ".", OffsetPtr);
  344   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
  344   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
  349   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
  353         "Invalid offset for a new buffer record (%" PRId64 ").", OffsetPtr);
  355   auto PreReadOffset = OffsetPtr;
  356   R.TID = E.getSigned(&OffsetPtr, sizeof(int32_t));
  357   if (PreReadOffset == OffsetPtr)
  360         "Cannot read a new buffer record at offset %" PRId64 ".", OffsetPtr);
  362   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
  362   OffsetPtr += MetadataRecord::kMetadataBodySize - (OffsetPtr - PreReadOffset);
  367   if (!E.isValidOffsetForDataOfSize(OffsetPtr,
  372         OffsetPtr);
  374   OffsetPtr += MetadataRecord::kMetadataBodySize;
  387   if (OffsetPtr == 0 || !E.isValidOffsetForDataOfSize(
  388                             --OffsetPtr, FunctionRecord::kFunctionRecordSize))
  391         "Invalid offset for a function record (%" PRId64 ").", OffsetPtr);
  393   auto BeginOffset = OffsetPtr;
  395   uint32_t Buffer = E.getU32(&OffsetPtr);
  396   if (PreReadOffset == OffsetPtr)
  399         "Cannot read function id field from offset %" PRId64 ".", OffsetPtr);
  420   PreReadOffset = OffsetPtr;
  421   R.Delta = E.getU32(&OffsetPtr);
  422   if (OffsetPtr == PreReadOffset)
  425         "Failed reading TSC delta from offset %" PRId64 ".", OffsetPtr);
  426   assert(FunctionRecord::kFunctionRecordSize == (OffsetPtr - BeginOffset));