Dump load time statistics
This commit is contained in:
parent
79b5c9789a
commit
b9fa839efb
|
@ -15,7 +15,7 @@ public:
|
|||
{
|
||||
duint addr;
|
||||
TRACEINDEX index;
|
||||
friend bool operator <(const Key & a, const Key & b)
|
||||
friend bool operator <(const Key & a, const Key & b) noexcept
|
||||
{
|
||||
// order is inverted, highest address is less! We want to use lower_bound() to find last memory access index.
|
||||
return a.addr > b.addr || a.addr == b.addr && a.index > b.index;
|
||||
|
@ -32,11 +32,11 @@ public:
|
|||
TraceFileDump();
|
||||
~TraceFileDump();
|
||||
void clear();
|
||||
inline void setEnabled()
|
||||
inline void setEnabled() noexcept
|
||||
{
|
||||
enabled = true;
|
||||
}
|
||||
inline bool isEnabled() const
|
||||
inline bool isEnabled() const noexcept
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
|
@ -48,11 +48,11 @@ public:
|
|||
void addMemAccess(duint addr, const void* oldData, const void* newData, size_t size);
|
||||
// Find pattern
|
||||
void findAllMem(const unsigned char* data, const unsigned char* mask, size_t size, std::function<bool(duint, TRACEINDEX, TRACEINDEX)> matchFunction) const;
|
||||
inline void increaseIndex()
|
||||
inline void increaseIndex() noexcept
|
||||
{
|
||||
maxIndex++;
|
||||
}
|
||||
inline TRACEINDEX getMaxIndex()
|
||||
inline TRACEINDEX getMaxIndex() noexcept
|
||||
{
|
||||
return maxIndex;
|
||||
}
|
||||
|
|
|
@ -145,7 +145,6 @@ void TraceWidget::traceSelectionChanged(TRACEINDEX selection)
|
|||
|
||||
void TraceWidget::xrefSlot(duint addr)
|
||||
{
|
||||
if(!mDump)
|
||||
if(!loadDumpFully())
|
||||
return;
|
||||
if(!mXrefDlg)
|
||||
|
@ -248,8 +247,15 @@ bool TraceWidget::loadDumpFully()
|
|||
if(!loadDump())
|
||||
return false;
|
||||
|
||||
QTime ticks;
|
||||
ticks.start();
|
||||
// Fully build dump index
|
||||
mTraceFile->buildDumpTo(mTraceFile->Length() - 1);
|
||||
auto elapsed = ticks.elapsed();
|
||||
if(elapsed >= 200)
|
||||
{
|
||||
GuiAddLogMessage(tr("Loaded trace dump in %1ms\n").arg(elapsed).toUtf8().constData());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue