From 18715a048e76877b51a51c033c447524c6240fff Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 22 Jun 2016 13:40:59 +0300 Subject: [PATCH] Added stripped classes for uRCU implementations with default template args for reducing debug info and gdb output --- cds/urcu/details/gpb.h | 11 +++++++++++ cds/urcu/details/gpi.h | 12 ++++++++++++ cds/urcu/details/gpt.h | 12 ++++++++++++ cds/urcu/details/sig_buffered.h | 12 ++++++++++++ cds/urcu/details/sig_threaded.h | 13 +++++++++++++ cds/urcu/general_buffered.h | 6 ++++++ cds/urcu/general_instant.h | 6 ++++++ cds/urcu/general_threaded.h | 6 ++++++ cds/urcu/signal_buffered.h | 7 +++++++ cds/urcu/signal_threaded.h | 6 ++++++ test/unit/set/michael_lazy_rcu_gpb.cpp | 4 +++- test/unit/set/michael_lazy_rcu_gpi.cpp | 4 +++- test/unit/set/michael_lazy_rcu_gpt.cpp | 6 ++++-- test/unit/set/michael_lazy_rcu_shb.cpp | 6 ++++-- test/unit/set/michael_lazy_rcu_sht.cpp | 6 ++++-- test/unit/set/michael_michael_rcu_gpb.cpp | 6 ++++-- test/unit/set/michael_michael_rcu_gpi.cpp | 6 ++++-- test/unit/set/michael_michael_rcu_gpt.cpp | 6 ++++-- test/unit/set/michael_michael_rcu_shb.cpp | 6 ++++-- test/unit/set/michael_michael_rcu_sht.cpp | 6 ++++-- 20 files changed, 129 insertions(+), 18 deletions(-) diff --git a/cds/urcu/details/gpb.h b/cds/urcu/details/gpb.h index 05b64aed..f16eaabc 100644 --- a/cds/urcu/details/gpb.h +++ b/cds/urcu/details/gpb.h @@ -254,6 +254,17 @@ namespace cds { namespace urcu { } }; + /// User-space general-purpose RCU with deferred (buffered) reclamation (stripped version) + /** + @headerfile cds/urcu/general_buffered.h + + This short version of \p general_buffered is intended for stripping debug info. + If you use \p %general_buffered with default template arguments you may use + this stripped version. All functionality of both classes are identical. + */ + class general_buffered_stripped: public general_buffered<> + {}; + }} // namespace cds::urcu #endif // #ifndef CDSLIB_URCU_DETAILS_GPB_H diff --git a/cds/urcu/details/gpi.h b/cds/urcu/details/gpi.h index 92db8f36..7abbfb39 100644 --- a/cds/urcu/details/gpi.h +++ b/cds/urcu/details/gpi.h @@ -101,6 +101,7 @@ namespace cds { namespace urcu { //@cond general_instant() {} + ~general_instant() {} @@ -191,6 +192,17 @@ namespace cds { namespace urcu { //@endcond }; + /// User-space general-purpose RCU with immediate reclamation (stripped version) + /** + @headerfile cds/urcu/general_instant.h + + This short version of \p general_instant is intended for stripping debug info. + If you use \p %general_instant with default template arguments you may use + this stripped version. All functionality of both classes are identical. + */ + class general_instant_stripped: public general_instant<> + {}; + }} // namespace cds::urcu #endif // #ifndef CDSLIB_URCU_DETAILS_GPI_H diff --git a/cds/urcu/details/gpt.h b/cds/urcu/details/gpt.h index 0d7e5e96..5c55008b 100644 --- a/cds/urcu/details/gpt.h +++ b/cds/urcu/details/gpt.h @@ -265,6 +265,18 @@ namespace cds { namespace urcu { return m_nCapacity; } }; + + /// User-space general-purpose RCU with deferred threaded reclamation (stripped version) + /** + @headerfile cds/urcu/general_threaded.h + + This short version of \p general_threaded is intended for stripping debug info. + If you use \p %general_threaded with default template arguments you may use + this stripped version. All functionality of both classes are identical. + */ + class general_threaded_stripped: public general_threaded<> + {}; + }} // namespace cds::urcu #endif // #ifndef CDSLIB_URCU_DETAILS_GPT_H diff --git a/cds/urcu/details/sig_buffered.h b/cds/urcu/details/sig_buffered.h index 0f73ba39..4c4e8c94 100644 --- a/cds/urcu/details/sig_buffered.h +++ b/cds/urcu/details/sig_buffered.h @@ -266,6 +266,18 @@ namespace cds { namespace urcu { } }; + + /// User-space signal-handled RCU with deferred (buffered) reclamation (stripped version) + /** + @headerfile cds/urcu/signal_buffered.h + + This short version of \p signal_buffered is intended for stripping debug info. + If you use \p %signal_buffered with default template arguments you may use + this stripped version. All functionality of both classes are identical. + */ + class signal_buffered_stripped: public signal_buffered<> + {}; + }} // namespace cds::urcu #endif // #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED diff --git a/cds/urcu/details/sig_threaded.h b/cds/urcu/details/sig_threaded.h index b08357c6..8f0cce7e 100644 --- a/cds/urcu/details/sig_threaded.h +++ b/cds/urcu/details/sig_threaded.h @@ -270,6 +270,19 @@ namespace cds { namespace urcu { return base_class::signal_no(); } }; + + + /// User-space signal-handled RCU with deferred threaded reclamation (stripped version) + /** + @headerfile cds/urcu/signal_threaded.h + + This short version of \p signal_threaded is intended for stripping debug info. + If you use \p %signal_threaded with default template arguments you may use + this stripped version. All functionality of both classes are identical. + */ + class signal_threaded_stripped: public signal_threaded<> + {}; + }} // namespace cds::urcu #endif // #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED diff --git a/cds/urcu/general_buffered.h b/cds/urcu/general_buffered.h index 59702c15..c63e3790 100644 --- a/cds/urcu/general_buffered.h +++ b/cds/urcu/general_buffered.h @@ -180,6 +180,12 @@ namespace cds { namespace urcu { } }; + //@cond + template<> + class gc< general_buffered_stripped >: public gc< general_buffered<>> + {}; + //@endcond + }} // namespace cds::urcu #endif // #ifndef CDSLIB_URCU_GENERAL_BUFFERED_H diff --git a/cds/urcu/general_instant.h b/cds/urcu/general_instant.h index 9ffd7cd7..6dca6a68 100644 --- a/cds/urcu/general_instant.h +++ b/cds/urcu/general_instant.h @@ -168,6 +168,12 @@ namespace cds { namespace urcu { {} }; + //@cond + template<> + class gc< general_instant_stripped >: public gc< general_instant<>> + {}; + //@endcond + }} // namespace cds::urcu #endif // #ifndef CDSLIB_URCU_GENERAL_INSTANT_H diff --git a/cds/urcu/general_threaded.h b/cds/urcu/general_threaded.h index 2db27f68..faf1e75c 100644 --- a/cds/urcu/general_threaded.h +++ b/cds/urcu/general_threaded.h @@ -187,6 +187,12 @@ namespace cds { namespace urcu { } }; + //@cond + template<> + class gc< general_threaded_stripped >: public gc< general_threaded<>> + {}; + //@endcond + }} // namespace cds::urcu #endif // #ifndef CDSLIB_URCU_GENERAL_THREADED_H diff --git a/cds/urcu/signal_buffered.h b/cds/urcu/signal_buffered.h index c458f2f0..03653bb8 100644 --- a/cds/urcu/signal_buffered.h +++ b/cds/urcu/signal_buffered.h @@ -192,6 +192,13 @@ namespace cds { namespace urcu { } }; + //@cond + template<> + class gc< signal_buffered_stripped >: public gc< signal_buffered<>> + {}; + //@endcond + + }} // namespace cds::urcu #endif // #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED diff --git a/cds/urcu/signal_threaded.h b/cds/urcu/signal_threaded.h index e8b2272f..b71e2e2a 100644 --- a/cds/urcu/signal_threaded.h +++ b/cds/urcu/signal_threaded.h @@ -200,6 +200,12 @@ namespace cds { namespace urcu { } }; + //@cond + template<> + class gc< signal_threaded_stripped >: public gc< signal_threaded<>> + {}; + //@endcond + }} // namespace cds::urcu #endif // #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED diff --git a/test/unit/set/michael_lazy_rcu_gpb.cpp b/test/unit/set/michael_lazy_rcu_gpb.cpp index 6cdf4f0a..36efaa6a 100644 --- a/test/unit/set/michael_lazy_rcu_gpb.cpp +++ b/test/unit/set/michael_lazy_rcu_gpb.cpp @@ -35,7 +35,9 @@ namespace { typedef cds::urcu::general_buffered<> rcu_implementation; + typedef cds::urcu::general_buffered_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB_stripped, MichaelLazySet, rcu_implementation_stripped ); diff --git a/test/unit/set/michael_lazy_rcu_gpi.cpp b/test/unit/set/michael_lazy_rcu_gpi.cpp index f81152c7..0cdd5c06 100644 --- a/test/unit/set/michael_lazy_rcu_gpi.cpp +++ b/test/unit/set/michael_lazy_rcu_gpi.cpp @@ -35,7 +35,9 @@ namespace { typedef cds::urcu::general_instant<> rcu_implementation; + typedef cds::urcu::general_instant_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI_stripped, MichaelLazySet, rcu_implementation_stripped ); diff --git a/test/unit/set/michael_lazy_rcu_gpt.cpp b/test/unit/set/michael_lazy_rcu_gpt.cpp index 3e7e917b..6056a6e6 100644 --- a/test/unit/set/michael_lazy_rcu_gpt.cpp +++ b/test/unit/set/michael_lazy_rcu_gpt.cpp @@ -34,8 +34,10 @@ namespace { - typedef cds::urcu::general_threaded<> rcu_implementation; + typedef cds::urcu::general_threaded<> rcu_implementation; + typedef cds::urcu::general_threaded_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT_stripped, MichaelLazySet, rcu_implementation_stripped ); diff --git a/test/unit/set/michael_lazy_rcu_shb.cpp b/test/unit/set/michael_lazy_rcu_shb.cpp index 0f65501e..0d27bf72 100644 --- a/test/unit/set/michael_lazy_rcu_shb.cpp +++ b/test/unit/set/michael_lazy_rcu_shb.cpp @@ -36,10 +36,12 @@ namespace { - typedef cds::urcu::signal_buffered<> rcu_implementation; + typedef cds::urcu::signal_buffered<> rcu_implementation; + typedef cds::urcu::signal_buffered_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB_stripped, MichaelLazySet, rcu_implementation_stripped ); #endif // CDS_URCU_SIGNAL_HANDLING_ENABLED diff --git a/test/unit/set/michael_lazy_rcu_sht.cpp b/test/unit/set/michael_lazy_rcu_sht.cpp index db2bbb56..5ba79e1e 100644 --- a/test/unit/set/michael_lazy_rcu_sht.cpp +++ b/test/unit/set/michael_lazy_rcu_sht.cpp @@ -36,10 +36,12 @@ namespace { - typedef cds::urcu::signal_threaded<> rcu_implementation; + typedef cds::urcu::signal_threaded<> rcu_implementation; + typedef cds::urcu::signal_threaded_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT, MichaelLazySet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT_stripped, MichaelLazySet, rcu_implementation_stripped ); #endif // CDS_URCU_SIGNAL_HANDLING_ENABLED diff --git a/test/unit/set/michael_michael_rcu_gpb.cpp b/test/unit/set/michael_michael_rcu_gpb.cpp index 9b2a1881..4183a0c3 100644 --- a/test/unit/set/michael_michael_rcu_gpb.cpp +++ b/test/unit/set/michael_michael_rcu_gpb.cpp @@ -34,8 +34,10 @@ namespace { - typedef cds::urcu::general_buffered<> rcu_implementation; + typedef cds::urcu::general_buffered<> rcu_implementation; + typedef cds::urcu::general_buffered_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPB_stripped, MichaelSet, rcu_implementation_stripped ); diff --git a/test/unit/set/michael_michael_rcu_gpi.cpp b/test/unit/set/michael_michael_rcu_gpi.cpp index a907d591..fcbf03fa 100644 --- a/test/unit/set/michael_michael_rcu_gpi.cpp +++ b/test/unit/set/michael_michael_rcu_gpi.cpp @@ -34,8 +34,10 @@ namespace { - typedef cds::urcu::general_instant<> rcu_implementation; + typedef cds::urcu::general_instant<> rcu_implementation; + typedef cds::urcu::general_instant_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPI_stripped, MichaelSet, rcu_implementation_stripped ); diff --git a/test/unit/set/michael_michael_rcu_gpt.cpp b/test/unit/set/michael_michael_rcu_gpt.cpp index f2a61a68..1aa272a1 100644 --- a/test/unit/set/michael_michael_rcu_gpt.cpp +++ b/test/unit/set/michael_michael_rcu_gpt.cpp @@ -34,8 +34,10 @@ namespace { - typedef cds::urcu::general_threaded<> rcu_implementation; + typedef cds::urcu::general_threaded<> rcu_implementation; + typedef cds::urcu::general_threaded_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_GPT_stripped, MichaelSet, rcu_implementation_stripped ); diff --git a/test/unit/set/michael_michael_rcu_shb.cpp b/test/unit/set/michael_michael_rcu_shb.cpp index be796351..84f28f55 100644 --- a/test/unit/set/michael_michael_rcu_shb.cpp +++ b/test/unit/set/michael_michael_rcu_shb.cpp @@ -36,10 +36,12 @@ namespace { - typedef cds::urcu::signal_buffered<> rcu_implementation; + typedef cds::urcu::signal_buffered<> rcu_implementation; + typedef cds::urcu::signal_buffered_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHB_stripped, MichaelSet, rcu_implementation_stripped ); #endif // CDS_URCU_SIGNAL_HANDLING_ENABLED diff --git a/test/unit/set/michael_michael_rcu_sht.cpp b/test/unit/set/michael_michael_rcu_sht.cpp index 58cf7f69..6a26d159 100644 --- a/test/unit/set/michael_michael_rcu_sht.cpp +++ b/test/unit/set/michael_michael_rcu_sht.cpp @@ -36,10 +36,12 @@ namespace { - typedef cds::urcu::signal_threaded<> rcu_implementation; + typedef cds::urcu::signal_threaded<> rcu_implementation; + typedef cds::urcu::signal_threaded_stripped rcu_implementation_stripped; } // namespace -INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT, MichaelSet, rcu_implementation ); +INSTANTIATE_TYPED_TEST_CASE_P( RCU_SHT_stripped, MichaelSet, rcu_implementation_stripped ); #endif // CDS_URCU_SIGNAL_HANDLING_ENABLED -- 2.34.1