base: only commit useful trace events

If the length of a trace event entry is zero it should be ommitted.

Fixes #851.
This commit is contained in:
Josef Söntgen 2013-08-21 16:57:46 +02:00 committed by Norman Feske
parent ae87f50ce3
commit 82eb5e4323
1 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,10 @@ class Genode::Trace::Buffer
void commit(size_t len)
{
/* omit empty entries */
if (len == 0)
return;
_head_entry()->len = len;
/* advance head offset, wrap when reaching buffer boundary */