Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
etw.cpp File Reference

(fb226262e8b371372fdc66b832b9eab24741f70d)

#include "etw.h"
#include "provider.h"
#include "helpers.h"
#include "qtheaders.h"
#include <qfile.h>
#include <qfileinfo.h>
#include <qtextstream.h>
#include <quuid.h>
+ Include dependency graph for etw.cpp:

Go to the source code of this file.

Functions

static QString providerVar (const QString &providerName)
 
static void writeEtwMacro (QTextStream &stream, const Tracepoint::Field &field)
 
static QString createGuid (const QUuid &uuid)
 
static void writePrologue (QTextStream &stream, const QString &fileName, const Provider &provider)
 
static void writeEpilogue (QTextStream &stream, const QString &fileName)
 
static void writeWrapper (QTextStream &stream, const Provider &provider, const Tracepoint &tracepoint, const QString &providerName)
 
static void writeEnumConverter (QTextStream &stream, const TraceEnum &enumeration)
 
static void writeFlagConverter (QTextStream &stream, const TraceFlags &flag)
 
static void writeTracepoints (QTextStream &stream, const Provider &provider)
 
void writeEtw (QFile &file, const Provider &provider)
 

Function Documentation

◆ createGuid()

static QString createGuid ( const QUuid & uuid)
static

Definition at line 80 of file etw.cpp.

References QUuid::data1, QUuid::data2, QUuid::data3, QUuid::data4, and Qt::hex().

Referenced by writePrologue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ providerVar()

static QString providerVar ( const QString & providerName)
inlinestatic

Definition at line 16 of file etw.cpp.

Referenced by writePrologue(), and writeWrapper().

+ Here is the caller graph for this function:

◆ writeEnumConverter()

static void writeEnumConverter ( QTextStream & stream,
const TraceEnum & enumeration )
static

Definition at line 210 of file etw.cpp.

References aggregateListValues(), TraceEnum::name, typeToTypeName(), and TraceEnum::values.

Referenced by writeTracepoints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeEpilogue()

static void writeEpilogue ( QTextStream & stream,
const QString & fileName )
static

Definition at line 160 of file etw.cpp.

References fileName, and includeGuard().

Referenced by writeEtw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeEtw()

void writeEtw ( QFile & file,
const Provider & provider )

Definition at line 282 of file etw.cpp.

References file, QFileInfo::fileName(), QFile::fileName(), fileName, writeEpilogue(), writePrologue(), and writeTracepoints().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeEtwMacro()

static void writeEtwMacro ( QTextStream & stream,
const Tracepoint::Field & field )
static

Definition at line 21 of file etw.cpp.

References Tracepoint::Field::arrayLen, Tracepoint::Field::backendType, Tracepoint::Field::EnumeratedType, Tracepoint::Field::FlagType, i, Tracepoint::Field::name, Tracepoint::Field::paramType, Tracepoint::Field::Pointer, Tracepoint::Field::QtByteArray, Tracepoint::Field::QtRect, Tracepoint::Field::QtRectF, Tracepoint::Field::QtSize, Tracepoint::Field::QtSizeF, Tracepoint::Field::QtString, Tracepoint::Field::QtUrl, typeToTypeName(), and Tracepoint::Field::Unknown.

Referenced by writeWrapper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeFlagConverter()

static void writeFlagConverter ( QTextStream & stream,
const TraceFlags & flag )
static

Definition at line 234 of file etw.cpp.

References aggregateListValues(), TraceFlags::name, typeToTypeName(), and TraceFlags::values.

Referenced by writeTracepoints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writePrologue()

static void writePrologue ( QTextStream & stream,
const QString & fileName,
const Provider & provider )
static

Definition at line 105 of file etw.cpp.

References createGuid(), QUuid::createUuidV5(), fileName, includeGuard(), Provider::name, Provider::prefixText, providerVar(), qtHeaders(), QString::toLocal8Bit(), QUuid::toString(), and writeCommonPrologue().

Referenced by writeEtw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeTracepoints()

static void writeTracepoints ( QTextStream & stream,
const Provider & provider )
static

Definition at line 256 of file etw.cpp.

References Provider::enumerations, Provider::flags, includeGuard(), QList< T >::isEmpty(), Provider::name, QStringLiteral, Provider::tracepoints, writeEnumConverter(), writeFlagConverter(), and writeWrapper().

Referenced by writeEtw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeWrapper()

static void writeWrapper ( QTextStream & stream,
const Provider & provider,
const Tracepoint & tracepoint,
const QString & providerName )
static

Definition at line 166 of file etw.cpp.

References ETW, formatFunctionSignature(), formatParameterList(), includeGuard(), providerVar(), QStringLiteral, tracepoint, Tracepoint::Field::Unknown, and writeEtwMacro().

Referenced by writeTracepoints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: