Commit 672aebb3 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5464 move partitioned_counter completely to portability

git-svn-id: file:///svn/toku/tokudb@48678 c7de825b-a66e-492c-adef-691d508d4ae1
parent d99b82fa
...@@ -56,7 +56,6 @@ set(FT_SOURCES ...@@ -56,7 +56,6 @@ set(FT_SOURCES
mempool mempool
minicron minicron
omt omt
partitioned_counter
pqueue pqueue
queue queue
quicklz quicklz
......
...@@ -101,8 +101,6 @@ if(BUILD_TESTING OR BUILD_FT_TESTS) ...@@ -101,8 +101,6 @@ if(BUILD_TESTING OR BUILD_FT_TESTS)
declare_custom_tests(bnc-insert-benchmark) declare_custom_tests(bnc-insert-benchmark)
add_test(ft/bnc-insert-benchmark bnc-insert-benchmark 100 4096000 1000) add_test(ft/bnc-insert-benchmark bnc-insert-benchmark 100 4096000 1000)
add_helgrind_test(ft/helgrind_test_partitioned_counter $<TARGET_FILE:test_partitioned_counter>)
configure_file(run_ftdump_test.sh . COPYONLY) configure_file(run_ftdump_test.sh . COPYONLY)
foreach(dump ftdump ftdump_static) foreach(dump ftdump ftdump_static)
add_executable(ft-test-for-${dump} ft-test) add_executable(ft-test-for-${dump} ft-test)
...@@ -126,7 +124,6 @@ if(BUILD_TESTING OR BUILD_FT_TESTS) ...@@ -126,7 +124,6 @@ if(BUILD_TESTING OR BUILD_FT_TESTS)
## give some tests, that time out normally, 1 hour to complete ## give some tests, that time out normally, 1 hour to complete
set(long_tests set(long_tests
ft/ftloader-test-extractor-3a ft/ftloader-test-extractor-3a
ft/helgrind_test_partitioned_counter
ft/log-test7 ft/log-test7
ft/recovery-bad-last-entry ft/recovery-bad-last-entry
ft/subblock-test-compression ft/subblock-test-compression
......
...@@ -4,6 +4,7 @@ set(tokuportability_srcs ...@@ -4,6 +4,7 @@ set(tokuportability_srcs
file file
memory memory
os_malloc os_malloc
partitioned_counter
portability portability
toku_assert toku_assert
toku_pthread toku_pthread
...@@ -26,7 +27,7 @@ set_property(SOURCE file memory os_malloc portability toku_assert toku_rwlock AP ...@@ -26,7 +27,7 @@ set_property(SOURCE file memory os_malloc portability toku_assert toku_rwlock AP
COMPILE_DEFINITIONS TOKU_ALLOW_DEPRECATED=1) COMPILE_DEFINITIONS TOKU_ALLOW_DEPRECATED=1)
install( install(
FILES toku_os_types.h toku_time.h FILES toku_os_types.h toku_time.h partitioned_counter.h
DESTINATION include DESTINATION include
) )
install( install(
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
#ifndef THREAD_LOCAL_COUNTER_H #ifndef PARTITIONED_COUNTER_H
#define THREAD_LOCAL_COUNTER_H #define PARTITIONED_COUNTER_H
// Overview: A partitioned_counter provides a counter that can be incremented and the running sum can be read at any time. // Overview: A partitioned_counter provides a counter that can be incremented and the running sum can be read at any time.
// We assume that increments are frequent, whereas reading is infrequent. // We assume that increments are frequent, whereas reading is infrequent.
...@@ -95,4 +95,4 @@ private: ...@@ -95,4 +95,4 @@ private:
}; };
#endif #endif
#endif #endif // PARTITIONED_COUNTER_H
...@@ -46,6 +46,8 @@ if(BUILD_TESTING) ...@@ -46,6 +46,8 @@ if(BUILD_TESTING)
COMMAND ensure_memcheck_fails.sh $<TARGET_FILE:${test}> valgrind --error-exitcode=1 --quiet --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,test,wc,*/wc) COMMAND ensure_memcheck_fails.sh $<TARGET_FILE:${test}> valgrind --error-exitcode=1 --quiet --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,test,wc,*/wc)
endforeach(test) endforeach(test)
add_helgrind_test(portability/helgrind_test_partitioned_counter $<TARGET_FILE:test_partitioned_counter>)
foreach(test ${tests}) foreach(test ${tests})
add_test(portability/${test} ${test}) add_test(portability/${test} ${test})
endforeach(test) endforeach(test)
...@@ -56,4 +58,10 @@ if(BUILD_TESTING) ...@@ -56,4 +58,10 @@ if(BUILD_TESTING)
) )
set_tests_properties(${portability_tests_should_fail} PROPERTIES WILL_FAIL TRUE) set_tests_properties(${portability_tests_should_fail} PROPERTIES WILL_FAIL TRUE)
set(long_tests
portability/helgrind_test_partitioned_counter
)
set_tests_properties(${long_tests} PROPERTIES TIMEOUT 3600)
endif(BUILD_TESTING) endif(BUILD_TESTING)
...@@ -3,7 +3,7 @@ add_custom_target(generate_config_h DEPENDS ...@@ -3,7 +3,7 @@ add_custom_target(generate_config_h DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/config.h") "${CMAKE_CURRENT_BINARY_DIR}/config.h")
install( install(
FILES toku_list.h toku_os.h partitioned_counter.h FILES toku_list.h toku_os.h
DESTINATION include DESTINATION include
) )
install( install(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment