Merge remote-tracking branch 'origin/fastpath'

* origin/fastpath:
  Change how input/logging threads set their name.
  Fix bug when clearing Bloom filter contents.
This commit is contained in:
Robin Sommer 2014-04-17 17:48:17 -05:00
commit 1ef4daf0a7
9 changed files with 17 additions and 20 deletions

View file

@ -1,4 +1,12 @@
2.2-338 | 2014-04-17 17:48:17 -0500
* Disable input/logging threads setting their names on every
heartbeat. (Jon Siwek)
* Fix bug when clearing Bloom filter contents. Reported by
@colonelxc. (Matthias Vallentin)
2.2-335 | 2014-04-10 15:04:57 -0700
* Small logic fix for main SSL script. (Bernhard Amann)

View file

@ -1 +1 @@
2.2-335
2.2-338

View file

@ -215,6 +215,8 @@ bool ReaderBackend::Init(const int arg_num_fields,
if ( Failed() )
return true;
SetOSName(Fmt("bro: %s", Name()));
num_fields = arg_num_fields;
fields = arg_fields;

View file

@ -180,6 +180,7 @@ void WriterBackend::DisableFrontend()
bool WriterBackend::Init(int arg_num_fields, const Field* const* arg_fields)
{
SetOSName(Fmt("bro: %s", Name()));
num_fields = arg_num_fields;
fields = arg_fields;

View file

@ -72,7 +72,7 @@ bool BasicBloomFilter::Empty() const
void BasicBloomFilter::Clear()
{
bits->Clear();
bits->Reset();
}
bool BasicBloomFilter::Merge(const BloomFilter* other)
@ -190,7 +190,7 @@ bool CountingBloomFilter::Empty() const
void CountingBloomFilter::Clear()
{
cells->Clear();
cells->Reset();
}
bool CountingBloomFilter::Merge(const BloomFilter* other)

View file

@ -75,9 +75,9 @@ bool CounterVector::AllZero() const
return bits->AllZero();
}
void CounterVector::Clear()
void CounterVector::Reset()
{
bits->Clear();
bits->Reset();
}
CounterVector::count_type CounterVector::Count(size_type cell) const

View file

@ -86,7 +86,7 @@ public:
/**
* Sets all counters to 0.
*/
void Clear();
void Reset();
/**
* Retrieves the number of cells in the storage.

View file

@ -53,7 +53,6 @@ public:
{ network_time = arg_network_time; current_time = arg_current_time; }
virtual bool Process() {
Object()->HeartbeatInChild();
return Object()->OnHeartbeat(network_time, current_time);
}
@ -254,15 +253,6 @@ void MsgThread::Heartbeat()
SendIn(new HeartbeatMessage(this, network_time, current_time()));
}
void MsgThread::HeartbeatInChild()
{
string n = Fmt("bro: %s (%" PRIu64 "/%" PRIu64 ")", Name(),
cnt_sent_in - queue_in.Size(),
cnt_sent_out - queue_out.Size());
SetOSName(n.c_str());
}
void MsgThread::Finished()
{
child_finished = true;

View file

@ -197,10 +197,6 @@ protected:
*/
virtual void Heartbeat();
/** Internal heartbeat processing. Called from child.
*/
void HeartbeatInChild();
/** Returns true if a child command has reported a failure. In that case, we'll
* be in the process of killing this thread and no further activity
* should carried out. To be called only from this child thread.