You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scheduler and performance counters operate on the special, negative return values from general_work(), which is a mathematically incorrect thing to do.
In the case of gr::block::WORK_DONE, this probably doesn't matter.
In the case of gr::block::WORK_CALLED_PRODUCE, values of the performance counters and the block's relative rate will be wrong.
The bad case in this, is someone using the single threaded scheduler and the blocks that return WORK_CALLED_PRODUCE, as it will cause buffer::index_add() to do a very wrong write pointer index update.
The text was updated successfully, but these errors were encountered:
would be high impact if people were using perf counters. Might be time to supersede them with instrumentation through uprobes, at least on Linux and FreeBSD
The scheduler and performance counters operate on the special, negative return values from general_work(), which is a mathematically incorrect thing to do.
In the case of gr::block::WORK_DONE, this probably doesn't matter.
In the case of gr::block::WORK_CALLED_PRODUCE, values of the performance counters and the block's relative rate will be wrong.
Only 3 blocks return WORK_CALLED_PRODUCE.
Offending lines:
https://github.com/gnuradio/gnuradio/blob/master/gnuradio-runtime/lib/block_executor.cc#L455 :
ifdef GR_PERFORMANCE_COUNTERS
endif /* GR_PERFORMANCE_COUNTERS */
and https://github.com/gnuradio/gnuradio/blob/master/gnuradio-runtime/lib/block_executor.cc#L472
and https://github.com/gnuradio/gnuradio/blob/master/gnuradio-runtime/lib/single_threaded_scheduler.cc#L338 :
The bad case in this, is someone using the single threaded scheduler and the blocks that return WORK_CALLED_PRODUCE, as it will cause buffer::index_add() to do a very wrong write pointer index update.
The text was updated successfully, but these errors were encountered: