Skip to content
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 #508

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/models/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ add_library(
disassemblymodel.cpp
disassemblyoutput.cpp
eventmodel.cpp
eventmodelproxy.cpp
filterandzoomstack.cpp
formattingutils.cpp
frequencymodel.cpp
Expand Down
34 changes: 16 additions & 18 deletions src/models/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -952,36 +952,37 @@ struct ThreadNames
QHash<qint32, QHash<qint32, QString>> names;
};

struct TracepointEvents
{
QString name;
Events events;
bool operator==(const TracepointEvents& rhs) const
{
return std::tie(name, events) == std::tie(rhs.name, rhs.events);
}
};

struct EventResults
{
QVector<ThreadEvents> threads;
QVector<CpuEvents> cpus;
QVector<TracepointEvents> tracepoints;
QVector<QVector<qint32>> stacks;
QVector<CostSummary> totalCosts;
qint32 offCpuTimeCostId = -1;
qint32 lostEventCostId = -1;
qint32 tracepointEventCostId = -1;

ThreadEvents* findThread(qint32 pid, qint32 tid);
const ThreadEvents* findThread(qint32 pid, qint32 tid) const;

bool operator==(const EventResults& rhs) const
{
return std::tie(threads, cpus, stacks, totalCosts, offCpuTimeCostId)
== std::tie(rhs.threads, rhs.cpus, rhs.stacks, rhs.totalCosts, rhs.offCpuTimeCostId);
return std::tie(threads, cpus, tracepoints, stacks, totalCosts, offCpuTimeCostId)
== std::tie(rhs.threads, rhs.cpus, rhs.tracepoints, rhs.stacks, rhs.totalCosts, rhs.offCpuTimeCostId);
}
};

struct Tracepoint
{
quint64 time = 0;
QString name;
};

struct TracepointResults
{
QVector<Tracepoint> tracepoints;
};

struct FilterAction
{
TimeRange time;
Expand Down Expand Up @@ -1094,11 +1095,8 @@ Q_DECLARE_TYPEINFO(Data::ThreadNames, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(Data::EventResults)
Q_DECLARE_TYPEINFO(Data::EventResults, Q_MOVABLE_TYPE);

Q_DECLARE_METATYPE(Data::Tracepoint)
Q_DECLARE_TYPEINFO(Data::Tracepoint, Q_MOVABLE_TYPE);

Q_DECLARE_METATYPE(Data::TracepointResults)
Q_DECLARE_TYPEINFO(Data::TracepointResults, Q_MOVABLE_TYPE);
Q_DECLARE_METATYPE(Data::TracepointEvents)
Q_DECLARE_TYPEINFO(Data::TracepointEvents, Q_MOVABLE_TYPE);

Q_DECLARE_METATYPE(Data::TimeRange)
Q_DECLARE_TYPEINFO(Data::TimeRange, Q_MOVABLE_TYPE);
Expand Down
Loading
Loading