From: tho Date: Fri, 13 Aug 2010 14:36:06 +0000 (+0000) Subject: SConstruct: added NDEBUG and BOOST_DISABLE_ASSERTS on final build X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=73a2b9252afa039e5e8d0cace3f658478b696483;p=senf.git SConstruct: added NDEBUG and BOOST_DISABLE_ASSERTS on final build Packets: enabled dumpPacketAnnotationRegistry() on non-debug build PPI: set BurstSocketReader default maxBurst git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1687 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index c4b1431..268dff9 100644 --- a/SConstruct +++ b/SConstruct @@ -103,7 +103,7 @@ env.Append( CXXFLAGS_debug = [ '-O0', '-g' ], CPPDEFINES = [ '$expandLogOption', '$CPPDEFINES_' ], - CPPDEFINES_final = [ 'SENF_PPI_NOTRACE', 'BOOST_NO_MT' ], + CPPDEFINES_final = [ 'SENF_PPI_NOTRACE', 'BOOST_NO_MT', 'NDEBUG', 'BOOST_DISABLE_ASSERTS' ], CPPDEFINES_normal = [ 'SENF_DEBUG' ], CPPDEFINES_debug = [ '$CPPDEFINES_normal' ], diff --git a/senf/PPI/SocketSource.hh b/senf/PPI/SocketSource.hh index d6af335..94ce023 100644 --- a/senf/PPI/SocketSource.hh +++ b/senf/PPI/SocketSource.hh @@ -162,10 +162,10 @@ namespace module { connector::ActiveOutput output; ///< Output connector to which the data received is written - ActiveBurstSocketSource(unsigned max_burst); - explicit ActiveBurstSocketSource(Reader reader, unsigned max_burst); - explicit ActiveBurstSocketSource(Handle const & handle, unsigned max_burst); - ActiveBurstSocketSource(Handle const & handle, Reader reader, unsigned max_burst); + ActiveBurstSocketSource(unsigned max_burst=0); + explicit ActiveBurstSocketSource(Reader reader, unsigned max_burst=0); + explicit ActiveBurstSocketSource(Handle const & handle, unsigned max_burst=0); + ActiveBurstSocketSource(Handle const & handle, Reader reader, unsigned max_burst=0); Reader & reader(); ///< Access Reader helper Handle handle(); ///< Access handle diff --git a/senf/Packets/Packet.test.cc b/senf/Packets/Packet.test.cc index 72e0569..8fe9771 100644 --- a/senf/Packets/Packet.test.cc +++ b/senf/Packets/Packet.test.cc @@ -343,9 +343,7 @@ SENF_AUTO_UNIT_TEST(packetAnnotation) BOOST_CHECK( Reg::lookup() < 0 ); BOOST_CHECK( Reg::lookup() < 0 ); -#ifdef SENF_DEBUG std::stringstream ss; - senf::dumpPacketAnnotationRegistry(ss); BOOST_CHECK_EQUAL( ss.str(), @@ -356,7 +354,6 @@ SENF_AUTO_UNIT_TEST(packetAnnotation) "(anonymous namespace)::ComplexEmptyAnnotation no yes 1\n" "(anonymous namespace)::IntAnnotation yes no 4\n" "(anonymous namespace)::LargeAnnotation no no 32\n" ); -#endif } #ifdef COMPILE_CHECK diff --git a/senf/Packets/PacketImpl.cc b/senf/Packets/PacketImpl.cc index d67a779..f9c598f 100644 --- a/senf/Packets/PacketImpl.cc +++ b/senf/Packets/PacketImpl.cc @@ -108,7 +108,7 @@ prefix_ void senf::detail::PacketImpl::updateIterators(PacketData * self, differ // b) 'self' // c) Those that come afterwards // For a), the change must be inside the packet since 'self' must be within those packets - // For b), the change must also be within since that's the packet we are changeing + // For b), the change must also be within since that's the packet we are changing // For c), the change must be outside the packet (we don't allow an upper packet to mess with // the the data owned by a packet further down the chain). It can be before or after the // packet. @@ -123,7 +123,7 @@ prefix_ void senf::detail::PacketImpl::updateIterators(PacketData * self, differ interpreter_list::iterator const i_end (interpreters_.end()); if (++i != i_end) if (pos <= difference_type(i->begin_)) - // pos is before the packet, it must then be before all futher packets ... + // pos is before the packet, it must then be before all further packets ... for (; i != i_end; ++i) { i->begin_ += n; i->end_ += n; @@ -156,7 +156,6 @@ prefix_ void * senf::detail::PacketImpl::complexAnnotation(AnnotationRegistry::k prefix_ void senf::detail::AnnotationRegistry::dumpRegistrations(std::ostream & os) { -#ifdef SENF_DEBUG boost::format fmt ("%-56.56s %-4.4s %-7.7s %5d\n"); os << "SENF_PACKET_ANNOTATION_SLOTS = " << SENF_PACKET_ANNOTATION_SLOTS << "\n" << "SENF_PACKET_ANNOTATION_SLOTSIZE = " << SENF_PACKET_ANNOTATION_SLOTSIZE << "\n"; @@ -172,7 +171,6 @@ prefix_ void senf::detail::AnnotationRegistry::dumpRegistrations(std::ostream & % (isComplex(key) ? "yes" : "no") % size(key); } -#endif } prefix_ void senf::dumpPacketAnnotationRegistry(std::ostream & os) diff --git a/senf/Packets/PacketImpl.hh b/senf/Packets/PacketImpl.hh index 5679aa2..0b4f905 100644 --- a/senf/Packets/PacketImpl.hh +++ b/senf/Packets/PacketImpl.hh @@ -78,7 +78,7 @@ namespace senf { Fast annotations are considerable faster than complex and slow annotations. However, only annotations which do not need constructor or destructor calls and which may be - zero-initialized (on the memory level) are elegible as fast annotations. + zero-initialized (on the memory level) are legible as fast annotations. It is thus desirable to eliminate any complex and slow annotations, if possible. To optimize the annotation system, you may take the following steps: