diff --git a/src/lib/error.hpp b/src/lib/error.hpp index 32cb92afe..44b797f59 100644 --- a/src/lib/error.hpp +++ b/src/lib/error.hpp @@ -284,6 +284,23 @@ namespace lumiera { , _OP_DESCR_, errID?errID:"??"); \ } +#define ERROR_LOG_AND_RETHROW(_FLAG_,_OP_DESCR_) \ + catch (std::exception& problem) \ + { \ + const char* errID = lumiera_error(); \ + WARN (_FLAG_, "%s failed: %s", _OP_DESCR_, problem.what()); \ + TRACE (debugging, "Error flag was: %s", errID); \ + throw; \ + } \ + catch (...) \ + { \ + const char* errID = lumiera_error(); \ + ERROR (_FLAG_, "%s failed with unknown exception; " \ + "error flag is: %s" \ + , _OP_DESCR_, errID?errID:"??"); \ + throw; \ + } + /******************************************************//** * convenience shortcut to catch and absorb any exception, * then returning a default value instead. This scheme is @@ -294,7 +311,7 @@ namespace lumiera { catch (std::exception& problem) \ { \ const char* errID = lumiera_error(); \ - WARN (stage, "%s (Signal Handler) failed: %s",\ + WARN (stage, "%s (Handler) failed: %s", \ _OP_DESCR_, problem.what()); \ TRACE (debugging, "Error flag was: %s", errID); \ return (_VAL_); \ @@ -302,7 +319,7 @@ namespace lumiera { catch (...) \ { \ const char* errID = lumiera_error(); \ - ERROR (stage, "(Signal Handler) %s failed with " \ + ERROR (stage, "(Handler) %s failed with " \ "unknown exception; error flag is: %s" \ , _OP_DESCR_, errID?errID:"??"); \ return (_VAL_); \ diff --git a/src/lib/incidence-count.hpp b/src/lib/incidence-count.hpp index 36814491e..ade788c8f 100644 --- a/src/lib/incidence-count.hpp +++ b/src/lib/incidence-count.hpp @@ -228,9 +228,9 @@ namespace lib { for (Sequence& seq : rec_) for (Inc& event : seq) timeline.emplace_back(event); - std::sort (timeline.begin(), timeline.end() - ,[](Inc const& l, Inc const& r) { return l.when < r.when; } - ); + std::stable_sort (timeline.begin(), timeline.end() + ,[](Inc const& l, Inc const& r) { return l.when < r.when; } + ); int active{0}; vector active_case; diff --git a/tests/vault/gear/test-chain-load.hpp b/tests/vault/gear/test-chain-load.hpp index 1acb8b107..75dda3c55 100644 --- a/tests/vault/gear/test-chain-load.hpp +++ b/tests/vault/gear/test-chain-load.hpp @@ -1789,14 +1789,15 @@ namespace test { */ double launch_and_wait() - { - return benchmarkTime ([this] - { - awaitBlocking( - performRun()); - }) - -_uSec(preRoll_); - } // timing starts with nominal zero without pre-roll + try { + return benchmarkTime ([this] + { + awaitBlocking( + performRun()); + }) + -_uSec(preRoll_); // timing accounted without pre-roll + } + ERROR_LOG_AND_RETHROW(test,"Scheduler testing") auto getScheduleSeq() @@ -1831,7 +1832,14 @@ namespace test { ScheduleCtx&& withInstrumentation (bool doWatch =true) { - watchInvocations_.reset (doWatch? new lib::IncidenceCount : nullptr); + if (doWatch) + { + watchInvocations_.reset (new lib::IncidenceCount); + watchInvocations_->expectThreads (work::Config::COMPUTATION_CAPACITY) + .expectIncidents(chainLoad_.size()); + } + else + watchInvocations_.reset(); return move(*this); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 30c45f042..872973f0e 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -111174,6 +111174,82 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + +

+ fast alle Threads sind im Contention-wait +

+ + +
+
+ + + + + + +

+ das ist zwar ganz klar geplant, aber ich jetzt lasse ich die Tests erst mal so laufen... +

+ + +
+ +
+ + + + + + +

+ Zwar beobachte ich die Memory-Corruption dann ehr beim Einfügen der Events, aber das kann sehr wohl ein Folge-Fehler sein. Ich sehe auch anderes Verhalten, das „eigentlich gar nicht möglich ist“ +

+ + +
+ + + + + + + +

+ Hier passiert ein Vector-realloc. Wenn währenddessen der nächste Thread kommt, macht der ebenfalls ein re-Alloc und die Memory-corruption wäre garantiert. +

+ + +
+
+ + + + + + + +

+ Das ist ein Instrumentierungs-Hilfsmittel, und generell nur darauf ausgelegt, »richtig verwendet zu werden« +

+ + +
+
+
+ + + +