summaryrefslogtreecommitdiff
path: root/src/plugins/ctfvisualizer/ctfvisualizerplugin.h
diff options
context:
space:
mode:
authorTim Henning <tim.henning@kdab.com>2019-08-29 11:45:45 +0200
committerTim Henning <tim.henning@kdab.com>2019-08-29 13:37:04 +0000
commit7fec4182059f2841239a06cc2402110aaa2a1ab4 (patch)
treeb5ccfc605c43af64a7259ae4b2e61865c1e75479 /src/plugins/ctfvisualizer/ctfvisualizerplugin.h
parent41361047b44282033ae13842e6f6d425b45b3d3a (diff)
downloadqt-creator-7fec4182059f2841239a06cc2402110aaa2a1ab4.tar.gz
Tracing: Add Chrome Trace Format Visualizer plugin
This new plugin adds a viewer for Chrome Trace Format (CTF) files (aka Trace Event Format). It uses the same UI components as the QML Profiler timeline and the Perf Profiler. The Trace Event Format is generated by different kinds of tracing tools. Usually the files are display with the trace-viewer, built into Chrome (chrome://tracing). This plugin was developed because of the high memory usage of trace-viewer, which makes it difficult to use with trace files bigger than 100 MB. The plugin fully supports all event types used in data generated by LTTng, converted to CTF by https://github.com/KDAB/ctf2ctf. Some of the more advanced event types used for example in Android system traces, though, are not supported. The viewer will silently ignore unsupported event types. Supported Event Types: - Begin, End, Duration and Instant events - Counter events (graphs) - Metadata events (process and thread name) The plugin uses nlohmann/json instead of QJson because of the ~128 MB object size limit by QJson. [ChangeLog][Tracing][CtfVisualizer] Added Chrome Trace Format Visualizer plugin Change-Id: I5969f7f83f3305712d4aec04487e2403510af64b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/ctfvisualizer/ctfvisualizerplugin.h')
-rw-r--r--src/plugins/ctfvisualizer/ctfvisualizerplugin.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/plugins/ctfvisualizer/ctfvisualizerplugin.h b/src/plugins/ctfvisualizer/ctfvisualizerplugin.h
new file mode 100644
index 0000000000..cd1844452c
--- /dev/null
+++ b/src/plugins/ctfvisualizer/ctfvisualizerplugin.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company,
+** info@kdab.com, author Tim Henning <tim.henning@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+#include <extensionsystem/iplugin.h>
+
+namespace CtfVisualizer {
+namespace Internal {
+
+class CtfVisualizerPlugin : public ExtensionSystem::IPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CtfVisualizer.json")
+
+public:
+ ~CtfVisualizerPlugin();
+
+ bool initialize(const QStringList &arguments, QString *errorString) final;
+ void extensionsInitialized() final;
+
+ class CtfVisualizerPluginPrivate *d = nullptr;
+};
+
+} // namespace Internal
+} // namespace CtfVisualizer