MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / CompressedEntry

Class CompressedEntry

runtime/Log.h:242–255  ·  view source on GitHub ↗

* Marks the beginning of a compressed log message and after this structure * comes the compressed arguments. The exact layout of the compressed * arguments is generated at compile-time (see the Python preprocessor), * but what comes immediately after this header are: * (1-4 bytes) pack()-ed FormatId * (1-8 bytes) pack()-ed rdtsc() timestamp * (0-n bytes

Source from the content-addressed store, hash-verified

240 * (0-n bytes) arguments (determined by preprocessor)
241 */
242 struct CompressedEntry {
243 // Byte representation of an EntryType::LOG_MSGS_OR_DIC to identify this
244 // as a CompressedRecordEntry.
245 uint8_t entryType:2;
246
247 // Value returned by pack(formatId), subtracted by 1 to save space.
248 // i.e. if pack() returned 2 this value is 1.
249 // TODO(syang0) this is an abstraction failure; it's not treating
250 // the value returned by pack() as a black box.
251 uint8_t additionalFmtIdBytes:2;
252
253 // Value returned by pack(timestamp)
254 uint8_t additionalTimestampBytes:4;
255 } __attribute__((packed));
256
257 /**
258 * Marker in the compressed log that indicates to which StagingBuffer/thread

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected