Skip to content

Commit

Permalink
Tracepoints: refactor the existing tracepoint names
Browse files Browse the repository at this point in the history
Use CamelCase, like the API they're tracing.

Change-Id: Ie718ab624d17c9186bcf05cc1276c8eccad7f454
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Rafael Roquetto <[email protected]>
  • Loading branch information
dangelog committed Jun 28, 2018
1 parent dbcaa6d commit ce6c434
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/corelib/kernel/qcoreapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ QCoreApplication::QCoreApplication(int &argc, char **argv

void QCoreApplicationPrivate::init()
{
Q_TRACE(qcoreapplicationprivate_init_entry);
Q_TRACE(QCoreApplicationPrivate_init_entry);

#if defined(Q_OS_MACOS)
QMacAutoReleasePool pool;
Expand Down Expand Up @@ -872,7 +872,7 @@ void QCoreApplicationPrivate::init()
is_app_running = true; // No longer starting up.
#endif

Q_TRACE(qcoreapplicationprivate_init_exit);
Q_TRACE(QCoreApplicationPrivate_init_exit);
}

/*!
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/plugin/qfactoryloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void QFactoryLoader::update()
qDebug() << "QFactoryLoader::QFactoryLoader() looking at" << fileName;
}

Q_TRACE(qfactoryloader_update, fileName);
Q_TRACE(QFactoryLoader_update, fileName);

library = QLibraryPrivate::findOrCreate(QFileInfo(fileName).canonicalFilePath());
if (!library->isPlugin()) {
Expand Down
4 changes: 2 additions & 2 deletions src/corelib/plugin/qlibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ bool QLibraryPrivate::load()
if (fileName.isEmpty())
return false;

Q_TRACE(qlibraryprivate_load_entry, fileName);
Q_TRACE(QLibraryPrivate_load_entry, fileName);

bool ret = load_sys();
if (qt_debug_component()) {
Expand All @@ -568,7 +568,7 @@ bool QLibraryPrivate::load()
installCoverageTool(this);
}

Q_TRACE(qlibraryprivate_load_exit, ret);
Q_TRACE(QLibraryPrivate_load_exit, ret);

return ret;
}
Expand Down
12 changes: 7 additions & 5 deletions src/corelib/qtcore.tracepoints
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
qcoreapplicationprivate_init_entry()
qcoreapplicationprivate_init_exit()
qfactoryloader_update(const QString &fileName)
qlibraryprivate_load_entry(const QString &fileName)
qlibraryprivate_load_exit(bool success)
QCoreApplicationPrivate_init_entry()
QCoreApplicationPrivate_init_exit()

QFactoryLoader_update(const QString &fileName)

QLibraryPrivate_load_entry(const QString &fileName)
QLibraryPrivate_load_exit(bool success)

QEvent_ctor(QEvent *event, int type)
QEvent_dtor(QEvent *event, int type)
Expand Down
8 changes: 4 additions & 4 deletions src/gui/kernel/qguiapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ void QGuiApplicationPrivate::eventDispatcherReady()

void QGuiApplicationPrivate::init()
{
Q_TRACE(qguiapplicationprivate_init_entry);
Q_TRACE(QGuiApplicationPrivate_init_entry);

#if defined(Q_OS_MACOS)
QMacAutoReleasePool pool;
Expand Down Expand Up @@ -1569,7 +1569,7 @@ void QGuiApplicationPrivate::init()
QObject::connect(q, &QGuiApplication::applicationNameChanged,
q, &QGuiApplication::applicationDisplayNameChanged);

Q_TRACE(qguiapplicationprivate_init_exit);
Q_TRACE(QGuiApplicationPrivate_init_exit);
}

extern void qt_cleanupFontDatabase();
Expand Down Expand Up @@ -1807,7 +1807,7 @@ bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArra

void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e)
{
Q_TRACE(qguiapplicationprivate_processwsevents_entry, e->type);
Q_TRACE(QGuiApplicationPrivate_processWindowSystemEvent_entry, e->type);

switch(e->type) {
case QWindowSystemInterfacePrivate::Mouse:
Expand Down Expand Up @@ -1918,7 +1918,7 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv
break;
}

Q_TRACE(qguiapplicationprivate_processwsevents_exit, e->type);
Q_TRACE(QGuiApplicationPrivate_processWindowSystemEvent_exit, e->type);
}

/*! \internal
Expand Down
18 changes: 10 additions & 8 deletions src/gui/qtgui.tracepoints
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
qfontdatabase_addapplicationfont(const QString &filename)
qfontdatabase_load(const QString &family, int pointSize)
qfontdatabase_loadengine(const QString &family, int pointSize)
qfontdatabaseprivate_addappfont(const QString &fileName)
qguiapplicationprivate_init_entry()
qguiapplicationprivate_init_exit()
qguiapplicationprivate_processwsevents_entry(int type)
qguiapplicationprivate_processwsevents_exit(int type)
QGuiApplicationPrivate_init_entry()
QGuiApplicationPrivate_init_exit()

QGuiApplicationPrivate_processWindowSystemEvent_entry(int type)
QGuiApplicationPrivate_processWindowSystemEvent_exit(int type)

QFontDatabase_addApplicationFont(const QString &filename)
QFontDatabase_load(const QString &family, int pointSize)
QFontDatabase_loadEngine(const QString &family, int pointSize)
QFontDatabasePrivate_addAppFont(const QString &fileName)
8 changes: 4 additions & 4 deletions src/gui/text/qfontdatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
QFontEngine *engine = loadSingleEngine(script, request, family, foundry, style, size);

if (engine && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol) {
Q_TRACE(qfontdatabase_loadengine, request.family, request.pointSize);
Q_TRACE(QFontDatabase_loadEngine, request.family, request.pointSize);

QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
Expand Down Expand Up @@ -2441,7 +2441,7 @@ int QFontDatabasePrivate::addAppFont(const QByteArray &fontData, const QString &
font.data = fontData;
font.fileName = fileName;

Q_TRACE(qfontdatabaseprivate_addappfont, fileName);
Q_TRACE(QFontDatabasePrivate_addAppFont, fileName);

int i;
for (i = 0; i < applicationFonts.count(); ++i)
Expand Down Expand Up @@ -2499,7 +2499,7 @@ int QFontDatabase::addApplicationFont(const QString &fileName)
if (!f.open(QIODevice::ReadOnly))
return -1;

Q_TRACE(qfontdatabase_addapplicationfont, fileName);
Q_TRACE(QFontDatabase_addApplicationFont, fileName);

data = f.readAll();
}
Expand Down Expand Up @@ -2799,7 +2799,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script)

QFontEngine *fe = nullptr;

Q_TRACE(qfontdatabase_load, req.family, req.pointSize);
Q_TRACE(QFontDatabase_load, req.family, req.pointSize);

req.fallBackFamilies = fallBackFamilies;
if (!req.fallBackFamilies.isEmpty())
Expand Down

0 comments on commit ce6c434

Please sign in to comment.