summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------grextras0
-rw-r--r--lib/block_actor.cpp7
-rw-r--r--lib/block_allocator.cpp2
-rw-r--r--lib/block_task.cpp2
-rw-r--r--lib/gras_impl/block_actor.hpp4
-rw-r--r--lib/gras_impl/debug.hpp3
6 files changed, 15 insertions, 3 deletions
diff --git a/grextras b/grextras
-Subproject 6f4af291890c4f6f9a6941b70c1004aa5749b49
+Subproject 88a6f7aa85baa2d6050ebbc14ada79fb21d6498
diff --git a/lib/block_actor.cpp b/lib/block_actor.cpp
index dd3119d..fee3c88 100644
--- a/lib/block_actor.cpp
+++ b/lib/block_actor.cpp
@@ -78,9 +78,16 @@ BlockActor::BlockActor(void):
thread_pool = get_active_thread_pool();
active_thread_pool.reset(); //actors hold this, now its safe to reset, weak_framework only
this->register_handlers();
+ this->handle_task_count = 0;
+ this->work_count = 0;
}
BlockActor::~BlockActor(void)
{
this->mark_done();
+ #ifdef WORK_COUNTS
+ if (work_count == 0) std::cerr << "\n WORK FAIL!!!" << std::endl;
+ std::cerr << name << " handle_task_count " << handle_task_count << std::endl;
+ std::cerr << name << " work_count " << work_count << std::endl;
+ #endif
}
diff --git a/lib/block_allocator.cpp b/lib/block_allocator.cpp
index 1f4490c..edac4c6 100644
--- a/lib/block_allocator.cpp
+++ b/lib/block_allocator.cpp
@@ -11,8 +11,6 @@ const size_t AT_LEAST_DEFAULT_ITEMS = 1 << 13;
const size_t AHH_TOO_MANY_BYTES = 1 << 20; //TODO
const size_t THIS_MANY_BUFFERS = 32;
-//TODO will need more complicated later
-
void BlockActor::buffer_returner(const size_t index, SBuffer &buffer)
{
//reset offset and length
diff --git a/lib/block_task.cpp b/lib/block_task.cpp
index 5216adc..8284ccc 100644
--- a/lib/block_task.cpp
+++ b/lib/block_task.cpp
@@ -113,7 +113,9 @@ void BlockActor::handle_task(void)
//-- Handle task may get called for incoming buffers,
//-- however, not all ports may have available buffers.
//------------------------------------------------------------------
+ this->handle_task_count++;
if (not this->is_work_allowed()) return;
+ this->work_count++;
#ifdef WORK_DEBUG
WorkDebugPrinter WDP(block_ptr->to_string());
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp
index afc248e..24143a1 100644
--- a/lib/gras_impl/block_actor.hpp
+++ b/lib/gras_impl/block_actor.hpp
@@ -156,6 +156,10 @@ struct BlockActor : Apology::Worker
long buffer_affinity;
std::vector<std::vector<OutputHintMessage> > output_allocation_hints;
+
+ //status keepers
+ size_t handle_task_count;
+ size_t work_count;
};
} //namespace gras
diff --git a/lib/gras_impl/debug.hpp b/lib/gras_impl/debug.hpp
index a90eb6c..e0e7a35 100644
--- a/lib/gras_impl/debug.hpp
+++ b/lib/gras_impl/debug.hpp
@@ -25,9 +25,10 @@ extern void *operator new(std::size_t n) throw (std::bad_alloc);
//-- define to enable these debugs:
//----------------------------------------------------------------------
//#define WORK_DEBUG
-//#define ASSERTING
+#define ASSERTING
//#define MESSAGE_TRACING
//#define ITEM_CONSPROD
+//#define WORK_COUNTS
//----------------------------------------------------------------------
//-- time accumulation printer