forked from qt-creator/qt-creator
CtfVisualizer: Allow strings for process and thread id
While the format document only uses numbers for these in its examples, the data type is not really specified there and chrome://tracing itself handles strings for them without complaint. On trace-generating side std::thread::id can't easily be serialized as a number, and strings can easily be supported in the viewer. Change-Id: I36c8497049d4933058b9f72a28f24e1d1cf0d5bb Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -28,7 +28,9 @@ class CtfTimelineModel : public Timeline::TimelineModel
|
||||
|
||||
public:
|
||||
explicit CtfTimelineModel(Timeline::TimelineModelAggregator *parent,
|
||||
CtfTraceManager *traceManager, int tid, int pid);
|
||||
CtfTraceManager *traceManager,
|
||||
const QString &tid,
|
||||
const QString &pid);
|
||||
|
||||
QRgb color(int index) const override;
|
||||
QVariantList labels() const override;
|
||||
@@ -44,7 +46,7 @@ public:
|
||||
|
||||
void finalize(double traceBegin, double traceEnd, const QString &processName, const QString &threadName);
|
||||
|
||||
int tid() const;
|
||||
QString tid() const;
|
||||
QString eventTitle(int index) const;
|
||||
|
||||
signals:
|
||||
@@ -65,9 +67,9 @@ private:
|
||||
protected:
|
||||
CtfTraceManager *const m_traceManager;
|
||||
|
||||
int m_threadId;
|
||||
QString m_threadId;
|
||||
QString m_threadName;
|
||||
int m_processId;
|
||||
QString m_processId;
|
||||
QString m_processName;
|
||||
|
||||
int m_maxStackSize = 0;
|
||||
|
||||
Reference in New Issue
Block a user