Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove libcoro dependency #11433

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions ACKNOWLEDGEMENTS
Original file line number Diff line number Diff line change
Expand Up @@ -27,64 +27,10 @@ Mark Adler, Robert Važan (CRC-32C [Castagnoli] for C++ and .NET)

3. This notice may not be removed or altered from any source distribution.

Russ Cox (asm.S from libcoroutine)
This software was developed as part of a project at MIT.

Copyright (c) 2005-2007 Russ Cox,
Massachusetts Institute of Technology

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Beman Dawes, Christopher M. Kohlhoff (Boost)
The Boost License (http://www.boost.org/users/license.html) does not require
attribution or republication when Boost is redistributed in object code form.

Steve Dekorte (libcoroutine)
Copyright (c) 2002, 2003 Steve Dekorte
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

¥ Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

¥ Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

¥ Neither the name of the author nor the names of other contributors may be used
to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The Go Authors (Go Tools)
Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down
15 changes: 0 additions & 15 deletions cmake/FDBComponents.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,6 @@ else()
target_include_directories(toml11_target SYSTEM INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/toml11/include)
endif()

################################################################################
# Coroutine implementation
################################################################################

set(DEFAULT_COROUTINE_IMPL boost)
if(WIN32)
# boost coroutine not available in windows build environment for now.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does boost support coroutine on windows now?

set(DEFAULT_COROUTINE_IMPL libcoro)
elseif(NOT APPLE AND NOT USE_ASAN AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^x86")
# revert to libcoro for x86 linux while we investigate a performance regression
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this changed? Is there still a performance regression?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. not sure what benchmark can show the regression? @xis19 , before merging, let's find the benchmark and compare performance first.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would circus work? Or it is already retired?

set(DEFAULT_COROUTINE_IMPL libcoro)
endif()

set(COROUTINE_IMPL ${DEFAULT_COROUTINE_IMPL} CACHE STRING "Which coroutine implementation to use. Options are boost and libcoro")

################################################################################
# AWS SDK
################################################################################
Expand Down
1 change: 0 additions & 1 deletion contrib/apiversioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
r"fdbrpc/zlib/.*",
r"fdbrpc/sha1/.*",
r"fdbrpc/xml2json.hpp$",
r"fdbrpc/libcoroutine/.*",
r"fdbrpc/libeio/.*",
r"fdbrpc/lib64/.*",
r"fdbrpc/generated-constants.cpp$",
Expand Down
29 changes: 1 addition & 28 deletions fdbrpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,12 @@ if(COMPILE_EIO)
target_compile_options(eio BEFORE PRIVATE -w) # disable warnings for eio
endif()

if(${COROUTINE_IMPL} STREQUAL libcoro)
set(CORO_SRCS libcoroutine/Common.c libcoroutine/Coro.c)
if(APPLE)
list(APPEND CORO_SRCS libcoroutine/asm.S)
endif()
if(NOT WIN32)
list(APPEND CORO_SRCS libcoroutine/context.c)
endif()
add_library(coro STATIC ${CORO_SRCS})
target_link_libraries(coro PRIVATE flow)
target_include_directories(coro PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libcoroutine)
if(WIN32)
target_compile_definitions(coro PRIVATE USE_FIBERS)
else()
target_compile_definitions(coro PRIVATE USE_UCONTEXT)
target_compile_options(coro BEFORE PRIVATE -w) # disable warnings for third party
endif()
if(USE_VALGRIND)
target_link_libraries(coro PUBLIC Valgrind)
endif()
endif()

target_include_directories(fdbrpc PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libeio)
target_link_libraries(fdbrpc PUBLIC flow libb64 md5 PRIVATE rapidjson)

target_include_directories(fdbrpc_sampling PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libeio)
target_link_libraries(fdbrpc_sampling PUBLIC flow_sampling libb64 md5 PRIVATE rapidjson)

if(${COROUTINE_IMPL} STREQUAL libcoro)
target_link_libraries(fdbrpc PUBLIC coro)
target_link_libraries(fdbrpc_sampling PUBLIC coro)
endif()

if(COMPILE_EIO)
target_link_libraries(fdbrpc PRIVATE eio)
target_link_libraries(fdbrpc_sampling PRIVATE eio)
Expand All @@ -86,4 +59,4 @@ if(WIN32)
add_dependencies(tokensign_actors fdbrpc_actors)
endif()

add_subdirectory(tests)
add_subdirectory(tests)
119 changes: 0 additions & 119 deletions fdbrpc/libcoroutine/386-ucontext.h

This file was deleted.

13 changes: 0 additions & 13 deletions fdbrpc/libcoroutine/Base.h

This file was deleted.

Loading