This commit is contained in:
QL 2020-10-05 11:34:50 -04:00
parent ae82110e1a
commit 030852de46
3 changed files with 28 additions and 22 deletions

View File

@ -170,23 +170,28 @@ static int custParserFun(QSpyRecord * const qrec) {
//............................................................................ //............................................................................
bool QP::QS::onStartup(void const *) { bool QP::QS::onStartup(void const *) {
static uint8_t qsBuf[4*1024]; // 4K buffer for Quantum Spy static uint8_t qsBuf[4*1024]; // 4K buffer for Quantum Spy
QSpyConfig qsc;
initBuf(qsBuf, sizeof(qsBuf)); initBuf(qsBuf, sizeof(qsBuf));
QSPY_config(QP_VERSION, // version qsc.version = QP_VERSION;
QS_OBJ_PTR_SIZE, // objPtrSize qsc.endianness = 0U;
QS_FUN_PTR_SIZE, // funPtrSize qsc.objPtrSize = QS_OBJ_PTR_SIZE;
QS_TIME_SIZE, // tstampSize qsc.funPtrSize = QS_FUN_PTR_SIZE;
Q_SIGNAL_SIZE, // sigSize, qsc.tstampSize = QS_TIME_SIZE;
QF_EVENT_SIZ_SIZE, // evtSize qsc.sigSize = Q_SIGNAL_SIZE;
QF_EQUEUE_CTR_SIZE, // queueCtrSize qsc.evtSize = QF_EVENT_SIZ_SIZE;
QF_MPOOL_CTR_SIZE, // poolCtrSize qsc.queueCtrSize = QF_EQUEUE_CTR_SIZE;
QF_MPOOL_SIZ_SIZE, // poolBlkSize qsc.poolCtrSize = QF_MPOOL_CTR_SIZE;
QF_TIMEEVT_CTR_SIZE,// tevtCtrSize qsc.poolBlkSize = QF_MPOOL_SIZ_SIZE;
nullptr, // matFile, qsc.tevtCtrSize = QF_TIMEEVT_CTR_SIZE;
nullptr,
&custParserFun); // customized parser function
l_time.start(); // start the time stamp QSPY_config(&qsc,
nullptr, // matFile,
nullptr, nullptr, // sequence file and list
&custParserFun); // customized parser function
l_time.start(); // start the time stamp
return true; // success return true; // success
} }

View File

@ -3,7 +3,7 @@
/// @cond /// @cond
///*************************************************************************** ///***************************************************************************
/// Last updated for version 6.9.1 / Qt 5.x /// Last updated for version 6.9.1 / Qt 5.x
/// Last updated on 2020-10-04 /// Last updated on 2020-10-05
/// ///
/// Q u a n t u m L e a P s /// Q u a n t u m L e a P s
/// ------------------------ /// ------------------------
@ -71,7 +71,7 @@ public:
std::uint_fast16_t const margin) noexcept override; std::uint_fast16_t const margin) noexcept override;
#else #else
bool post_(QEvt const * const e, std::uint_fast16_t const margin, bool post_(QEvt const * const e, std::uint_fast16_t const margin,
void const * const sender) override; void const * const sender) noexcept override;
#endif // Q_SPY #endif // Q_SPY
void postLIFO(QEvt const * const e) noexcept override; void postLIFO(QEvt const * const e) noexcept override;
}; };

View File

@ -3,7 +3,7 @@
/// @cond /// @cond
///*************************************************************************** ///***************************************************************************
/// Last updated for version 6.9.1 / Qt 5.x /// Last updated for version 6.9.1 / Qt 5.x
/// Last updated on 2020-09-21 /// Last updated on 2020-10-05
/// ///
/// Q u a n t u m L e a P s /// Q u a n t u m L e a P s
/// ------------------------ /// ------------------------
@ -41,6 +41,7 @@
#include "qassert.h" #include "qassert.h"
#ifdef Q_SPY // QS software tracing enabled? #ifdef Q_SPY // QS software tracing enabled?
#include "qs_port.hpp" // include QS port #include "qs_port.hpp" // include QS port
#include "qs_pkg.hpp" // QS package-scope internal interface
#else #else
#include "qs_dummy.hpp" // disable the QS software tracing #include "qs_dummy.hpp" // disable the QS software tracing
#endif // Q_SPY #endif // Q_SPY
@ -128,7 +129,7 @@ bool GuiQActive::post_(QEvt const * const e,
QF_EVT_REF_CTR_INC_(e); // increment the reference counter QF_EVT_REF_CTR_INC_(e); // increment the reference counter
} }
QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me_prio) QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, m_prio)
QS_TIME_PRE_(); // timestamp QS_TIME_PRE_(); // timestamp
QS_OBJ_PRE_(sender); // the sender object QS_OBJ_PRE_(sender); // the sender object
QS_SIG_PRE_(e->sig); // the signal of the event QS_SIG_PRE_(e->sig); // the signal of the event
@ -155,7 +156,7 @@ void GuiQActive::postLIFO(QEvt const * const e) noexcept {
QF_EVT_REF_CTR_INC_(e); // increment the reference counter QF_EVT_REF_CTR_INC_(e); // increment the reference counter
} }
QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, me_prio) QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, m_prio)
QS_TIME_PRE_(); // timestamp QS_TIME_PRE_(); // timestamp
QS_SIG_PRE_(e->sig); // the signal of this event QS_SIG_PRE_(e->sig); // the signal of this event
QS_OBJ_PRE_(this); // this active object QS_OBJ_PRE_(this); // this active object
@ -199,7 +200,7 @@ bool GuiQMActive::post_(QEvt const * const e,
#else #else
bool GuiQMActive::post_(QEvt const * const e, bool GuiQMActive::post_(QEvt const * const e,
std::uint_fast16_t const /*margin*/, std::uint_fast16_t const /*margin*/,
void const * const sender) void const * const sender) noexcept
#endif #endif
{ {
QF_CRIT_STAT_ QF_CRIT_STAT_
@ -210,7 +211,7 @@ bool GuiQMActive::post_(QEvt const * const e,
QF_EVT_REF_CTR_INC_(e); // increment the reference counter QF_EVT_REF_CTR_INC_(e); // increment the reference counter
} }
QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, me_prio) QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST, m_prio)
QS_TIME_PRE_(); // timestamp QS_TIME_PRE_(); // timestamp
QS_OBJ_PRE_(sender); // the sender object QS_OBJ_PRE_(sender); // the sender object
QS_SIG_PRE_(e->sig); // the signal of the event QS_SIG_PRE_(e->sig); // the signal of the event
@ -237,7 +238,7 @@ void GuiQMActive::postLIFO(QEvt const * const e) noexcept {
QF_EVT_REF_CTR_INC_(e); // increment the reference counter QF_EVT_REF_CTR_INC_(e); // increment the reference counter
} }
QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, me_prio) QS_BEGIN_NOCRIT_PRE_(QS_QF_ACTIVE_POST_LIFO, m_prio)
QS_TIME_PRE_(); // timestamp QS_TIME_PRE_(); // timestamp
QS_SIG_PRE_(e->sig); // the signal of this event QS_SIG_PRE_(e->sig); // the signal of this event
QS_OBJ_PRE_(this); // this active object QS_OBJ_PRE_(this); // this active object