const QString& AboutData::Organization = "Samsung Electronics";
const QString& AboutData::CopyrightStatement =
- i18n("Copyright 2015, Milian Wolff <mail@milianw.de>. " \
- "Copyright 2018, Samsung Electronics.");
+ i18n("Copyright 2015, Milian Wolff. " \
+ "Copyright 2018, Samsung Electronics");
+
+const QString& AboutData::ComponentName = QStringLiteral("TizenMemoryProfiler");
+
+const QString& AboutData::ShortName = QStringLiteral("Tizen Memory Profiler");
+
+const QString& AboutData::DisplayName = i18n("Tizen Memory Profiler");
+
+const QString& AboutData::Version = QStringLiteral("0.2");
+
+const QString& AboutData::ShortDescription = i18n("A visualizer for Tizen Memory Profiler data files");
const QString& AboutData::BugAddress = "TODO"; // TODO!!
#else
const QString& AboutData::CopyrightStatement = i18n("Copyright 2015, Milian Wolff <mail@milianw.de>");
-const QString& AboutData::BugAddress = QStringLiteral("mail@milianw.de");
-#endif
-
const QString& AboutData::ComponentName = QStringLiteral("heaptrack_gui");
+const QString& AboutData::ShortName = QStringLiteral("heaptrack");
+
const QString& AboutData::DisplayName = i18n("Heaptrack GUI");
const QString& AboutData::Version = QStringLiteral("0.1");
-const QString& AboutData::ShortDescription = i18n("A visualizer for heaptrack data files.");
+const QString& AboutData::ShortDescription = i18n("A visualizer for heaptrack data files");
+
+const QString& AboutData::BugAddress = QStringLiteral("mail@milianw.de");
+#endif
public:
const static QString& Organization;
const static QString& ComponentName;
+ const static QString& ShortName;
const static QString& DisplayName;
const static QString& Version;
const static QString& ShortDescription;
ui->textEdit->viewport()->setAutoFillBackground(false);
ui->textEdit->setHtml(QString(
- "<h2>A visualizer for heaptrack data files</h2>" \
- "<p>Copyright 2015, Milian Wolff " \
- "<<a href=mailto:mail@milianw.de>mail@milianw.de</a>></p>" \
+ "<h2>%1 v.%2</h2>" \
+ "<p>%3</p>")
+ .arg(AboutData::DisplayName).arg(AboutData::Version)
+ .arg(AboutData::ShortDescription)
+ +
+#ifdef SAMSUNG_TIZEN_BRANCH
+ QString(
+ "<p>Based on Heaptrack memory profiler created by Milian Wolff " \
+ "<<a href=mailto:mail@milianw.de>mail@milianw.de</a>></p>") +
+#endif
+ QString(
+ "<p>%4</p>")
+ .arg(AboutData::CopyrightStatement) +
+ QString(
"<p>GNU LESSER GENERAL PUBLIC LICENSE v.2.1</p>" \
- "<p>Original author, maintainer: Milian Wolff</p>" \
- "<p>Copyright 2018, %1</p>" \
"<p>The application is based in part on the work of the Qwt project " \
- "(<a href=http://qwt.sf.net>qwt.sf.net</a>)</p>" \
+ "(<a href=http://qwt.sf.net>qwt.sf.net</a>)</p>")
+#ifdef WINDOWS
+ + QString(
"<p>Application icon (free for commercial use): Jack Cai " \
"(<a href=http://www.doublejdesign.co.uk>www.doublejdesign.co.uk</a>)</p>")
- .arg(AboutData::Organization)
+#endif
);
QFontMetrics fm(ui->textEdit->font());
"called. Function symbol and file "
"information "
"may be unknown when debug information was missing when "
- "heaptrack was run.</qt>");
+ "the memory profiler was run.</qt>");
case NUM_COLUMNS:
break;
}
#include <QApplication>
#include <QCommandLineParser>
+#include <QMessageBox>
#ifdef NO_K_LIB
#include "noklib.h"
QApplication app(argc, argv);
#ifndef NO_K_LIB
- KLocalizedString::setApplicationDomain("heaptrack");
+ KLocalizedString::setApplicationDomain(AboutData::ShortName);
const auto LicenseType = KAboutLicense::LGPL;
+ (isShowPrivateClean ? 1 : 0)
+ (isShowShared ? 1 : 0) != 1) {
- qFatal("One of --malloc, --managed, --private_dirty, --private_clean or --shared options is necessary. Please, use exactly only one of the options for each start of GUI.");
+ const auto msg = "One of --malloc, --managed, --private_dirty, --private_clean or --shared options is necessary. " \
+ "Please, use exactly only one of the options for each start of GUI.";
+
+ QMessageBox::critical(nullptr, AboutData::DisplayName + " Error", msg, QMessageBox::Ok);
+
+ qFatal(msg);
return 1;
} else if (isShowMalloc)
Util::formatByteSize(data.CoreCLRPart.peak, 1),
Util::formatByteSize(data.nonCoreCLRPart.peak, 1),
Util::formatByteSize(data.unknownPart.peak, 1))
- << i18n("<dt><b>peak RSS</b> (including heaptrack "
- "overhead):</dt><dd>%1</dd>",
+ << i18n("<dt><b>peak RSS</b> (including %1 "
+ "overhead):</dt><dd>%2</dd>",
+ AboutData::ShortName,
Util::formatByteSize(data.peakRSS, 1))
<< i18n("<dt><b>total memory leaked</b>:</dt><dd>%1</dd>"
"</dt><dd>%2 (CoreCLR), %3 (non-CoreCLR), %4 (unknown)</dd>",
Util::formatByteSize(data.nonCoreCLRPart.peak, 1),
Util::formatByteSize(data.untrackedPart.peak, 1),
Util::formatByteSize(data.unknownPart.peak, 1))
- << i18n("<dt><b>peak RSS</b> (including heaptrack "
- "overhead):</dt><dd>%1</dd>",
+ << i18n("<dt><b>peak RSS</b> (including %1 "
+ "overhead):</dt><dd>%2</dd>",
+ AboutData::ShortName,
Util::formatByteSize(data.peakRSS, 1))
<< i18n("<dt><b>total memory leaked</b>:</dt><dd>%1</dd>"
"</dt><dd>%2 (CoreCLR), %3 (non-CoreCLR), %4 (sbrk heap), %5 (unknown)</dd>",
"after %2s</dd>",
Util::formatByteSize(data.cost.peak, 1),
peakTimeS)
- << i18n("<dt><b>peak RSS</b> (including heaptrack "
- "overhead):</dt><dd>%1</dd>",
+ << i18n("<dt><b>peak RSS</b> (including %1 "
+ "overhead):</dt><dd>%2</dd>",
+ AboutData::ShortName,
Util::formatByteSize(data.peakRSS, 1))
<< i18n("<dt><b>total memory leaked</b>:</dt><dd>%1</dd>",
Util::formatByteSize(data.cost.leaked, 1))
m_ui->widget_12->hide();
}
- setWindowTitle(i18n("Heaptrack"));
+ setWindowTitle(AboutData::ShortName);
// closing the current file shows the stack page to open a new one
#ifdef NO_K_LIB
m_openAction = new QAction(i18n("&Open..."), this);
m_closeAction->setEnabled(false);
m_ui->loadingLabel->setText(i18n("Loading file %1, please wait...", file));
if (diffBase.isEmpty()) {
- setWindowTitle(i18nc("%1: file name that is open", "Heaptrack - %1", QFileInfo(file).fileName()));
+ setWindowTitle(i18nc("%1: application name; %2: file name that is open", "%1 - %2",
+ AboutData::ShortName, QFileInfo(file).fileName()));
m_diffMode = false;
} else {
- setWindowTitle(i18nc("%1, %2: file names that are open", "Heaptrack - %1 compared to %2",
- QFileInfo(file).fileName(), QFileInfo(diffBase).fileName()));
+ setWindowTitle(i18nc("%1: application name; %2, %3: file names that are open", "%1 - %2 compared to %3",
+ AboutData::ShortName, QFileInfo(file).fileName(), QFileInfo(diffBase).fileName()));
m_diffMode = true;
}
m_ui->pages->setCurrentWidget(m_ui->loadingPage);
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
- <string>Open Heaptrack Data</string>
+ <string>Open Memory Profiler Data</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="1" column="0">
<item>
<widget class="QLineEdit" name="openFileEdit">
<property name="toolTip">
- <string><qt><p>This field specifies the primary heaptrack data file. These files are called <tt>heaptrack.$APP.$PID.gz</tt>. You can produce such a file by profiling your application, e.g. via:</p>
+ <string><qt><p>This field specifies the primary memory profiler data file. These files are called <tt>heaptrack.$APP.$PID.gz</tt>. You can produce such a file by profiling your application, e.g. via:</p>
<pre><code>heaptrack &lt;yourapplication&gt; ...</code></pre>
<p>Or, alternatively, you can attach to a running process via</p>
<pre><code>heaptrack --pid $(pidof &lt;yourapplication&gt;)</code></pre></qt></string>
<item>
<widget class="QLineEdit" name="compareToEdit">
<property name="toolTip">
- <string><qt>You can optionally specify a second heaptrack data file to compare to. If set, this file will be used as a base and its cost gets subtracted from the primary data costs.</qt></string>
+ <string><qt>You can optionally specify a second memory profiler data file to compare to. If set, this file will be used as a base and its cost gets subtracted from the primary data costs.</qt></string>
</property>
<property name="text">
<string/>
"called. Function symbol and file "
"information "
"may be unknown when debug information was missing when "
- "heaptrack was run.</qt>");
+ "the memory profiler was run.</qt>");
case NUM_COLUMNS:
break;
}
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
-TARGET = heaptrack_gui_qt
+TARGET = heaptrack_gui
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
INCLUDEPATH += $$PWD/analyze/gui
# build heaptrack for Samsung Tizen OS
-DEFINES += SAMSUNG_TIZEN_BRANCH
+CONFIG += SAMSUNG_TIZEN_BRANCH
+
+SAMSUNG_TIZEN_BRANCH {
+ DEFINES += SAMSUNG_TIZEN_BRANCH
+ TARGET = TizenMemoryProfiler
+}
win32 {
CONFIG += NO_K_LIB NO_K_CHART
# comment the next line to not use QWT (i.e. don't show charts)
CONFIG += QWT_CHART
- DEFINES += NO_K_LIB NO_K_CHART
+ DEFINES += NO_K_LIB NO_K_CHART WINDOWS
INCLUDEPATH += $$(BOOST_LIB)
LIBS += -L$$(BOOST_LIB)/stage/lib