-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracepoint hover #684
base: master
Are you sure you want to change the base?
Tracepoint hover #684
Conversation
6b7e717
to
0bb88e0
Compare
a4eef75
to
f434e6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really great work @lievenhey and sorry for the overly long delay in reviewing. there are only a few minor things left from the code POV, I'll now look at the CI failure and also test-run it locally a bit
@@ -1145,6 +1151,10 @@ class PerfParserPrivate : public QObject | |||
{ | |||
Q_ASSERT(string.id == strings.size()); | |||
strings.push_back(QString::fromUtf8(string.string)); | |||
|
|||
if (string.string == QByteArray("sched:sched_switch")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QByteArrayLiteral or just compare to a string literal? your code forced an unneeded allocation
src/models/timelinedelegate.cpp
Outdated
}); | ||
|
||
const auto format = results.tracePointFormats[tracepoint.tracepointFormat]; | ||
qDebug() << format.systemId << format.nameId << format.format; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove debug output
}); | ||
|
||
for (auto it = tracepointFormat.cbegin(), end = tracepointFormat.cend(); it != end; it++) { | ||
qDebug() << "FORMAT" << strings.value(it->format.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dito
std::transform(tracepointData.cbegin(), tracepointData.cend(), std::back_inserter(eventResult.tracePointData), | ||
[this](const TracePointData& data) -> Data::TracePointData { | ||
QHash<QString, QVariant> tracepointData; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tracepointData.reserve(data.data.size())
|
||
#include "data.h" | ||
|
||
class TracePointFormatter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only used by formatTracepoint
, so this can move to the .cpp
file (into an anon namespace there?)
@@ -0,0 +1,83 @@ | |||
#include "tracepointformat.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing license header
The tracepoints are getting a better visual representation on the timelinewidget so this is no longer necessary.
Move the tracepoints from TimeAxisHeaderView to TimeLineWidget so that we can use the header for cpu usage. This also improves usability since the tracepoints are no longer bundles in one line. They now each have their own line.
Enum automatically counts up so there is no need to manually set these values.
this allows the user to group important timelines together so that he can compare them better
The favourites and tracepoint patches include some rows in the model that may be empty. To keep the code simple an readable all rows will be shown. Then a proxy model is put ontop to remove empty rows.
This way we can more easily find them and changing the sort order doesn't move them to the bottom.
Showing only one cost is fine if we only show a hardware event, but since we now support tracepoints and some come in an enter/exit pair it requires us to rework the timeline delegate. This patch makes the event source combobox multi select and allows to select multiple event sources.
This patch allows hotspot to correctly parse most format string from the tracepoint definition. If that fails every entry in the tracepoint will be printed unformatted. In this case it is possible to add a custom formatter.
f434e6d
to
5a6105a
Compare
This PR expands the tracepoint PR to show additional information when hovering over a tracepoint.
This requires the perfparser PR to be merged.
This is still wip. The following things are planned: