summaryrefslogtreecommitdiff
path: root/lib/gras_impl
diff options
context:
space:
mode:
authorJosh Blum2013-05-06 02:44:24 -0700
committerJosh Blum2013-05-06 02:44:24 -0700
commit770955f266603f0dad54e7aec8f8c0aa65a15f51 (patch)
tree2a8a56dc4ca804192def0aae420c8010fdb2fe70 /lib/gras_impl
parent1818f96690423650d3eff31291b827b4ef2690e8 (diff)
parent7139a4cb92091938692b3d640c20fbb300bb0929 (diff)
downloadsandhi-770955f266603f0dad54e7aec8f8c0aa65a15f51.tar.gz
sandhi-770955f266603f0dad54e7aec8f8c0aa65a15f51.tar.bz2
sandhi-770955f266603f0dad54e7aec8f8c0aa65a15f51.zip
Merge branch 'theron6_work'
Diffstat (limited to 'lib/gras_impl')
-rw-r--r--lib/gras_impl/block_actor.hpp2
-rw-r--r--lib/gras_impl/input_buffer_queues.hpp3
-rw-r--r--lib/gras_impl/stats.hpp6
3 files changed, 11 insertions, 0 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp
index e5dbaac..170ee1f 100644
--- a/lib/gras_impl/block_actor.hpp
+++ b/lib/gras_impl/block_actor.hpp
@@ -129,6 +129,8 @@ struct BlockActor : Apology::Worker
OutputBufferQueues output_queues;
std::vector<bool> produce_outputs;
BitSet inputs_available;
+ std::vector<time_ticks_t> time_input_not_ready;
+ std::vector<time_ticks_t> time_output_not_ready;
//tag and msg tracking
std::vector<bool> input_tags_changed;
diff --git a/lib/gras_impl/input_buffer_queues.hpp b/lib/gras_impl/input_buffer_queues.hpp
index e45bc06..f9ae3a2 100644
--- a/lib/gras_impl/input_buffer_queues.hpp
+++ b/lib/gras_impl/input_buffer_queues.hpp
@@ -165,6 +165,7 @@ struct InputBufferQueues
std::vector<boost::circular_buffer<SBuffer> > _queues;
std::vector<size_t> _preload_bytes;
std::vector<boost::shared_ptr<SimpleBufferQueue> > _aux_queues;
+ std::vector<item_index_t> bytes_copied;
};
@@ -178,6 +179,7 @@ GRAS_FORCE_INLINE void InputBufferQueues::resize(const size_t size)
_preload_bytes.resize(size, 0);
_reserve_bytes.resize(size, 1);
_maximum_bytes.resize(size, MAX_AUX_BUFF_BYTES);
+ bytes_copied.resize(size);
}
inline void InputBufferQueues::update_config(
@@ -254,6 +256,7 @@ GRAS_FORCE_INLINE void InputBufferQueues::accumulate(const size_t i)
SBuffer &front = _queues[i].front();
const size_t bytes = std::min(front.length, free_bytes);
std::memcpy(accum_buff.get(accum_buff.length), front.get(), bytes);
+ bytes_copied[i] += bytes;
//std::cerr << "memcpy " << bytes << std::endl;
accum_buff.length += bytes;
free_bytes -= bytes;
diff --git a/lib/gras_impl/stats.hpp b/lib/gras_impl/stats.hpp
index 7edab29..a6d83ed 100644
--- a/lib/gras_impl/stats.hpp
+++ b/lib/gras_impl/stats.hpp
@@ -36,8 +36,14 @@ struct BlockStats
std::vector<item_index_t> items_produced;
std::vector<item_index_t> tags_produced;
std::vector<item_index_t> msgs_produced;
+ std::vector<item_index_t> bytes_copied;
+
+ //port starvation tracking
+ std::vector<time_ticks_t> inputs_idle;
+ std::vector<time_ticks_t> outputs_idle;
//instantaneous port status
+ size_t actor_queue_depth;
std::vector<size_t> items_enqueued;
std::vector<size_t> msgs_enqueued;
std::vector<size_t> tags_enqueued;