Skip to content

Commit

Permalink
7.1.1
Browse files Browse the repository at this point in the history
added scheduler records QS_SCHED_PREEMPT and QS_SCHED_RESTORE
  • Loading branch information
quantum-leaps committed Sep 4, 2022
1 parent 0529923 commit 0c6f17f
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 54 deletions.
Binary file removed bin/qclean
Binary file not shown.
Binary file removed bin/qspy
Binary file not shown.
134 changes: 126 additions & 8 deletions doxygen/Doxyfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Doxyfile 1.9.4

@INCLUDE = ../../ql-doxygen/ql-doxyfile
# Doxyfile 1.9.5

#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QTools"
PROJECT_NAME = QTools
PROJECT_NUMBER = 7.1.1
PROJECT_BRIEF = "Collection of Host-Based Tools"
PROJECT_LOGO = ../../ql-doxygen/images/logo_ql.png
Expand Down Expand Up @@ -42,6 +40,17 @@ PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES = "nav{2}=<span class=\"prev_button\">@ref \1</span><span class=\"next_button\">@ref \2</span>" \
"nav_prev{1}=<span class=\"prev_button\">@ref \1</span>" \
"nav_next{1}=<span class=\"next_button\">@ref \1</span>" \
"next{1}=<span class=\"next_button\">@ref \1</span>" \
"description=@par Description" \
"usage=@par Usage" \
"hint=@par Hint" \
"label{1}=<div class=\"label\">\1</div>" \
"caption{1}=<div class=\"caption\" align=\"center\">\1</div>" \
"webref{2}=<a class=\"extern\" target=\"_blank\" href=\"https://www.state-machine.com/\1\">\2</a>" \
"tr{1}=@xrefitem tr \"Traceability\" \"\" traces to: @ref \1"
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
Expand Down Expand Up @@ -147,6 +156,7 @@ INPUT = main.dox \
../qwin/qwin_gui.h \
../qwin/qwin_gui.c
INPUT_ENCODING = UTF-8
INPUT_FILE_ENCODING =
FILE_PATTERNS = *.dox \
*.h \
*.hpp \
Expand All @@ -163,12 +173,12 @@ EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = images \
../../ql-doxygen/images

INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
FORTRAN_COMMENT_AFTER = 72
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
Expand Down Expand Up @@ -203,12 +213,11 @@ HTML_EXTRA_STYLESHEET = ../../ql-doxygen/doxygen-awesome.css \
../../ql-doxygen/doxygen-awesome-sidebar-only.css \
../../ql-doxygen/doxygen-awesome-sidebar-only-darkmode-toggle.css \
../../ql-doxygen/ql-awesome.css

HTML_EXTRA_FILES = ../../ql-doxygen/doxygen-awesome-darkmode-toggle.js \
../../ql-doxygen/doxygen-awesome-fragment-copy-button.js \
../../ql-doxygen/doxygen-awesome-paragraph-link.js \
../../ql-doxygen/ql-preview.js

HTML_COLORSTYLE = AUTO_LIGHT
HTML_COLORSTYLE_HUE = 209
HTML_COLORSTYLE_SAT = 255
HTML_COLORSTYLE_GAMMA = 113
Expand Down Expand Up @@ -248,7 +257,6 @@ EXT_LINKS_IN_WINDOW = NO
OBFUSCATE_EMAILS = NO
HTML_FORMULA_FORMAT = png
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
FORMULA_MACROFILE =
USE_MATHJAX = NO
MATHJAX_VERSION = MathJax_2
Expand All @@ -264,6 +272,68 @@ SEARCHDATA_FILE = searchdata.xml
EXTERNAL_SEARCH_ID = QTOOLS
EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
LATEX_MAKEINDEX_CMD = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = letter
EXTRA_PACKAGES =
LATEX_HEADER =
LATEX_FOOTER =
LATEX_EXTRA_STYLESHEET =
LATEX_EXTRA_FILES =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
LATEX_BIB_STYLE = plain
LATEX_TIMESTAMP = NO
LATEX_EMOJI_DIRECTORY =
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# Configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_SUBDIR =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# Configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_PROGRAMLISTING = YES
XML_NS_MEMB_FILE_SCOPE = NO
#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
GENERATE_DOCBOOK = NO
DOCBOOK_OUTPUT = docbook
#---------------------------------------------------------------------------
# Configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
Expand All @@ -276,3 +346,51 @@ PREDEFINED = Q_SPY \
Q_UTEST
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
DOT_NUM_THREADS = 0
DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = NO
GROUP_GRAPHS = YES
UML_LOOK = YES
UML_LIMIT_NUM_FIELDS = 10
DOT_UML_DETAILS = NO
DOT_WRAP_THRESHOLD = 17
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DIR_GRAPH_MAX_DEPTH = 1
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH = C:/tools/graphviz/bin
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
2 changes: 1 addition & 1 deletion doxygen/history.dox
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
@page history Revision History

@section qtools_7_1_1 Version 7.1.0, 2022-08-30
@section qtools_7_1_1 Version 7.1.1, 2022-08-30
Slightly restructured QSPY source code to better integrate directly with QP applications. Specifically, moved QSPY_cleanup() to qspy.c, so it is available to the applications.


Expand Down
18 changes: 10 additions & 8 deletions qspy/include/qpc_qs.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,16 @@ enum QSpyPre {
/* [47] Additional Memory Pool (MP) records */
QS_QF_MPOOL_GET_ATTEMPT, /*!< attempt to get a memory block failed */

/* [48] reserved */
QS_MUTEX_LOCK, /*!< @deprecated */
QS_MUTEX_UNLOCK, /*!< @deprecated */
/* [48] old Mutex records, reclaimed for scheduler in QP 7.1.1 */
QS_SCHED_PREEMPT, /*!< scheduler asynchronously preempted a task */
QS_SCHED_RESTORE, /*!< scheduler restored preempted task */

/* [50] Scheduler (SC) records */
QS_SCHED_LOCK, /*!< scheduler was locked */
QS_SCHED_UNLOCK, /*!< scheduler was unlocked */
QS_SCHED_NEXT, /*!< scheduler found next task to execute */
QS_SCHED_IDLE, /*!< scheduler became idle */
QS_SCHED_RESUME, /*!< scheduler resumed previous task (not idle) */
QS_SCHED_NEXT, /*!< scheduler started new task */
QS_SCHED_IDLE, /*!< scheduler restored the idle task */
QS_SCHED_RESUME, /*!< scheduler resumed a task */

/* [55] Additional QEP records */
QS_QEP_TRAN_HIST, /*!< a tran to history was taken */
Expand All @@ -234,7 +234,7 @@ enum QSpyPre {
/* [71] Semaphore (SEM) records */
QS_SEM_TAKE, /*!< a semaphore was taken by a thread */
QS_SEM_BLOCK, /*!< a semaphore blocked a thread */
QS_SEM_SIGNAL, /*!< a semaphore was signaled*/
QS_SEM_SIGNAL, /*!< a semaphore was signaled */
QS_SEM_BLOCK_ATTEMPT, /*!< a semaphore blocked was attempted */

/* [75] Mutex (MTX) records */
Expand All @@ -260,6 +260,8 @@ enum QSpyGroups {
QS_TE_RECORDS, /*!< Time Events QS records */
QS_QF_RECORDS, /*!< QF QS records */
QS_SC_RECORDS, /*!< Scheduler QS records */
QS_SEM_RECORDS, /*!< Semaphore QS records */
QS_MTX_RECORDS, /*!< Mutex QS records */
QS_U0_RECORDS, /*!< User Group 100-104 records */
QS_U1_RECORDS, /*!< User Group 105-109 records */
QS_U2_RECORDS, /*!< User Group 110-114 records */
Expand Down Expand Up @@ -1575,7 +1577,7 @@ void QActiveDummy_dispatch_(
*/
void QActiveDummy_start_(
QActive * const me,
QPrioSpec const prio,
QPrioSpec const prioSpec,
QEvt const * * const qSto,
uint_fast16_t const qLen,
void * const stkSto,
Expand Down
2 changes: 1 addition & 1 deletion qspy/include/qspy.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <[email protected]>
============================================================================*/
/*!
* @date Last updated on: 2022-08-29
* @date Last updated on: 2022-09-03
* @version Last updated for version: 7.1.1
*
* @file
Expand Down
50 changes: 30 additions & 20 deletions qspy/source/qspy.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* <[email protected]>
============================================================================*/
/*!
* @date Last updated on: 2022-08-29
* @date Last updated on: 2022-09-03
* @version Last updated for version: 7.1.1
*
* @file
Expand Down Expand Up @@ -145,11 +145,9 @@ QSpyRecRender const QSPY_rec[QS_USER] = {
/* [47] Additional Memory Pool (MP) records */
{ "QS_QF_MPOOL_GET_ATTEMPT", GRP_MP },

/* [48] old Mutex records (deprecated) */
{ "QS_MUTEX_LOCK", GRP_MTX },
{ "QS_MUTEX_UNLOCK", GRP_MTX },

/* [50] Scheduler (SC) records */
/* [48] Scheduler (SC) records */
{ "QS_SCHED_PREEMPT", GRP_SC },
{ "QS_SCHED_RESTORE", GRP_SC },
{ "QS_SCHED_LOCK", GRP_SC },
{ "QS_SCHED_UNLOCK", GRP_SC },
{ "QS_SCHED_NEXT", GRP_SC },
Expand Down Expand Up @@ -1673,25 +1671,37 @@ static void QSpyRecord_process(QSpyRecord * const me) {
break;
}

/* old Mutex records, deprecated in QP 7.1.0
* see QS_MTX_LOCK, etc.
*/
case QS_MUTEX_LOCK:
if (s == 0) s = "Mtx-Lock";
case QS_SCHED_PREEMPT:
if (QSPY_conf.version < 710U) {
/* old QS_MUTEX_LOCK */
if (s == 0) s = "Mtx-Lock";
}
else {
if (s == 0) s = "Sch-Pre ";
}
/* fall through */
case QS_MUTEX_UNLOCK: {
if (s == 0) s = "Mtx-Unlk";
case QS_SCHED_RESTORE: {
t = QSpyRecord_getUint32(me, QSPY_conf.tstampSize);
a = QSpyRecord_getUint32(me, 1);
b = QSpyRecord_getUint32(me, 1);
if (QSpyRecord_OK(me)) {
SNPRINTF_LINE("%010u %s Pro=%u,Ceil=%u",
t,
s,
a, b);
QSPY_onPrintLn();
FPRINF_MATFILE("%d %u %u %u\n",
(int)me->rec, t, a, b);
if (QSPY_conf.version < 710U) {
/* old QS_MUTEX_UNLOCK */
if (s == 0) s = "Mtx-Unlk";
SNPRINTF_LINE("%010u %s Pro=%u,Ceil=%u",
t, s, a, b);
QSPY_onPrintLn();
FPRINF_MATFILE("%d %u %u %u\n",
(int)me->rec, t, a, b);
}
else {
if (s == 0) s = "Sch-Rest";
SNPRINTF_LINE("%010u %s Pri=%u->%u",
t, s, b, a);
QSPY_onPrintLn();
FPRINF_MATFILE("%d %u %u %u\n",
(int)me->rec, t, b, a);
}
}
break;
}
Expand Down
14 changes: 6 additions & 8 deletions qutest/qutest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
# <[email protected]>
#=============================================================================
##
# @date Last updated on: 2022-08-22
# @version Last updated for version: 7.1.0
# @date Last updated on: 2022-09-03
# @version Last updated for version: 7.1.1
#
# @file
# @brief QUTest Python scripting support (implementation)
Expand Down Expand Up @@ -52,7 +52,7 @@
# https://www.state-machine.com/qtools/qutest_script.html
#
class QUTest:
VERSION = 710
VERSION = 711

# class variables
_host_exe = ""
Expand Down Expand Up @@ -1046,10 +1046,8 @@ class QSpy:
# [47] Additional Memory Pool (MP) records
"QS_QF_MPOOL_GET_ATTEMPT",

# [48] old Mutex records (deprecated in QP 7.1.0)
"QS_MUTEX_LOCK", "QS_MUTEX_UNLOCK",

# [50] Scheduler (SC) records
# [48] Scheduler (SC) records
"QS_SCHED_PREEMPT", "QS_SCHED_RESTORE",
"QS_SCHED_LOCK", "QS_SCHED_UNLOCK",
"QS_SCHED_NEXT", "QS_SCHED_IDLE",
"QS_SCHED_RESUME",
Expand Down Expand Up @@ -1111,7 +1109,7 @@ class QSpy:
_GLB_FLT_MASK_TE = 0x00000000000000000000003F00000000
_GLB_FLT_MASK_EQ = 0x00000000000000000000400000780000
_GLB_FLT_MASK_MP = 0x00000000000000000000800003000000
_GLB_FLT_MASK_SC = 0x0000000000000000007C000000000000
_GLB_FLT_MASK_SC = 0x0000000000000000007F000000000000
_GLB_FLT_MASK_SEM= 0x00000000000007800000000000000000
_GLB_FLT_MASK_MTX= 0x000000000001F8000000000000000000
_GLB_FLT_MASK_U0 = 0x000001F0000000000000000000000000
Expand Down
Loading

0 comments on commit 0c6f17f

Please sign in to comment.