Simutrace 3.2.2
Simulation Tracing Framework
SimuStorTypes.h File Reference
#include "SimuBaseTypes.h"

Data Structures

struct  StreamTypeDescriptor
 Describes the type of entries in a stream. More...
 
struct  StreamDescriptor
 Describes a stream. More...
 
union  StreamRangeInformation
 Describes data ranges in a stream. More...
 
struct  StreamStatistics
 Statistic information on a stream. More...
 
struct  StreamQueryInformation
 Stream query result. More...
 

Typedefs

typedef ObjectId SessionId
 Id of a session. More...
 
typedef uint64_t CycleCount
 Cycle count type. More...
 
typedef ObjectId StreamId
 Id of a stream. More...
 
typedef Guid StreamTypeId
 Id of a stream type. More...
 
typedef ObjectId StreamSegmentId
 Stream sequence number. More...
 

Enumerations

enum  StreamTypeFlags
 Stream type flags. More...
 
enum  StreamFlags
 Basic stream flags. More...
 
enum  QueryIndexType
 Type for stream open queries. More...
 
enum  StreamAccessFlags
 Stream access behavior. More...
 

Functions

static uint32_t makeVariableEntrySize (uint32_t sizeHint)
 Makes the entry size for variable-sized data streams. More...
 
static _bool isVariableEntrySize (uint32_t entrySize)
 Determines if a given entry size is variable. More...
 
static uint32_t getEntrySize (const StreamTypeDescriptor *desc)
 Returns the entry size of a stream type. More...
 

Typedef Documentation

typedef ObjectId SessionId

Identifies a session as originally created by StSessionCreate().

Since
3.0
typedef uint64_t CycleCount

To measure simulation time Simutrace uses the number of passed CPU cycles since the start of the simulation. For functional simulation, the cycle count degenerates to the number of executed instructions. The cycle count is used as time stamp throughout Simutrace (e.g., in temporally ordered streams, see StreamTypeDescriptor).

Since
3.0
typedef ObjectId StreamId

Identifies a certain stream. The id is session and store local and is thus only valid in combination with a SessionId.

Since
3.0
typedef Guid StreamTypeId

Identifies a stream type. The id is a globally unique identifier (GUID) and should be generated randomly and kept fixed for a certain type of entries.

Since
3.0
typedef ObjectId StreamSegmentId

In Simutrace, streams are divided into segments of equal size (e.g., 64 MiB) to allow partial and multi-threaded compression/decompression. Each segment is identified via its sequence number. The first segment in a stream gets the sequence number 0, the second segment gets the sequence number 1 and so on.

Since
3.0

Enumeration Type Documentation

Describes specific properties of a stream and its entries.

Since
3.2
Enumerator
StfTemporalOrder 

Temporally ordered stream.

Indicates if the entries in the stream are temporally ordered, that is if the entries contain a time stamp. The first member in each entry must be a 48 bit (TEMPORAL_ORDER_CYCLE_COUNT_BITS) monotonically increasing (cycle) counter field.

StfBigEndian 

Value endianess. Not supported, yet.

StfArch32Bit 

Indicates if type is meant for 32 bit architectures.

Describes general properties of the stream that are independent of the specified entry type.

Since
3.2
Enumerator
SfNone 

Regular stream for recording events

SfHidden 

Hidden stream. Internal, do not set

SfDynamic 

Dynamic stream. Entries are generated dynamically. Stream descriptor must be of type DynamicStreamDescriptor.

See also
StStreamRegisterDynamic()

The query type specifies the type of position the caller requests in a call to StStreamOpen(). Depending on the type, the supplied query value is interpreted differently.

Remarks
Dynamic streams are technically not forced to adhere to the semantic. See the dynamic stream's documentation for more information.
Since
3.0
See also
StStreamOpen()
Enumerator
QIndex 

Index of an entry. The first entry in a stream has index 0, the second one has index 1 and so on

QCycleCount 

Cycle count of an entry

QRealTime 

Wall clock time. Simutrace automatically records the wall clock time for each segment (e.g., 64 MiB) of trace data in a stream

_QMaxTree 

Internal, do not use

QSequenceNumber 

The sequence number of a stream segment

QNextValidSequenceNumber 

Points to the next valid sequence number

QPreviousValidSequenceNumber 

Points to the previous sequence number

Since
3.1
QUserIndex0 

Available for free use with dynamic streams

Since
3.2
QUserIndex1 

Available for free use with dynamic streams

Since
3.2
QUserIndex2 

Available for free use with dynamic streams

Since
3.2
QUserIndex3 

Available for free use with dynamic streams

Since
3.2

Describes the intended stream access behavior. Simutrace uses this as hint to adapt caching, read-ahead policies and interpret query values.

Remarks
Dynamic streams are technically not forced to adhere to the semantic. See the dynamic stream's documentation for more information.
Since
3.0
See also
StStreamOpen()
Enumerator
SafNone 

No information. Trace data is cached with LRU, no read-ahead

SafSequentialScan 

The caller intends to read the stream in sequential order. Segments are cached, but reused as soon as possible to avoid cache pollution. Maximum read-ahead. This access pattern and settings provide best read performance

SafRandomAccess 

Data is accessed in random order. Segments are cached, but reused as soons as possible to avoid cache pollution, no read-ahead

SafSynchronous 

Internal, do not use

SafReverseQuery 

The query information specified in the call to StStreamOpen() are relative to the end of the stream

Since
3.1
SafReverseRead 

The caller intends to read the stream in reverse order. In a call to StStreamOpen(), this flag prepares the new read handle for use with StGetPreviousEntryFast()

Since
3.1
SafUserFlag0 

Available for free use with dynamic streams

Since
3.2
SafUserFlag1 

Available for free use with dynamic streams

Since
3.2
SafUserFlag2 

Available for free use with dynamic streams

Since
3.2
SafUserFlag3 

Available for free use with dynamic streams

Since
3.2

Function Documentation

static uint32_t makeVariableEntrySize ( uint32_t  sizeHint)
inlinestatic

Variable-sized data streams are distinguished by fixed-sized data streams by specifically encoding the entry size property of a stream. To register a stream for variable-sized data use this method to make the entry size value.

Parameters
sizeHintVariable-sized data is stored by splitting it into specifically encoded fixed-sized blocks. The size hint should be chosen so that it is the expected mean length of the variable-sized data that should be stored in the stream.
Returns
The encoded entry size value, which can be used to register a new stream.
Remarks
Variable-sized entries are not supported for dynamic streams. If the stream should return entries of different size, consider to use a fixed-size meta entry that contains information on the size, type, and location of the real entry and return this instead.
Since
3.0
See also
StStreamRegister()
isVariableEntrySize()
getEntrySize()
static _bool isVariableEntrySize ( uint32_t  entrySize)
inlinestatic

This method determines if the given entry size encodes a variable entry size.

Parameters
entrySizeThe entry size to check.
Returns
_true if the entry size is variable, _false otherwise.
Since
3.0
See also
makeVariableEntrySize()
getEntrySize()
static uint32_t getEntrySize ( const StreamTypeDescriptor desc)
inlinestatic

This method extracts the entry size of the supplied stream type. For variable-sized stream types it will return the size hint as given to makeVariableEntrySize().

Parameters
descPointer to a stream type description from which to read the entry size.
Returns
The entry size of the given stream type.
Since
3.0
See also
makeVariableEntrySize()
Karlsruhe Institute of Technology (KIT)
Operating Systems Group

http://simutrace.org
Generated by doxygen 1.8.10
Marc Rittinghaus