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

IomgrEventEngine #29616

Merged
merged 29 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0643614
initial version, incomplete. Builds, `Run` works, no Cancel
drfloob May 9, 2022
71eccdc
Implement Cancel using Handle sets from #29581
drfloob May 9, 2022
f2ba052
Conformance tests for the IomgrEventEngine
drfloob May 9, 2022
c26f1a6
missind deps and formatting
drfloob May 9, 2022
93ea002
format & sanitize
drfloob May 9, 2022
eb1e977
Merge branch 'master' into sleepless-weekend
drfloob May 9, 2022
93c4eb4
tidy
drfloob May 9, 2022
5dd7495
timer kludge for clock drift
drfloob May 10, 2022
038fb05
Merge branch 'master' into sleepless-weekend
drfloob May 10, 2022
01e913e
iwyu
drfloob May 10, 2022
3f94984
better clock conversions
drfloob May 10, 2022
edab1d0
fix races around time travel in BDP Estimator test.
drfloob May 10, 2022
bd7a76c
Merge branch 'master' into sleepless-weekend
drfloob May 10, 2022
8fe518b
EE API changes
drfloob May 10, 2022
44ecba3
Add tracing
drfloob May 10, 2022
fffbc8f
generate_projects
drfloob May 10, 2022
2235e44
remove callback race and add tracing
drfloob May 11, 2022
1e8f840
Merge branch 'master' into sleepless-weekend
drfloob May 11, 2022
5915aa2
undelete handle_containers.h
drfloob May 11, 2022
cf5ea9b
iwyu & format
drfloob May 11, 2022
afbf78d
cleanup TODOs
drfloob May 11, 2022
4b2c1df
Merge branch 'master' into sleepless-weekend
drfloob May 11, 2022
a3e9527
iwyu & format
drfloob May 11, 2022
c624969
expose event_engine_trace target
drfloob May 11, 2022
c587012
trace
drfloob May 11, 2022
a4f7a42
Merge branch 'master' into sleepless-weekend
drfloob May 11, 2022
66b4191
add appropriate namespaces
drfloob May 11, 2022
cd2f8e7
Merge branch 'master' into sleepless-weekend
drfloob May 13, 2022
20a22cf
fix
drfloob May 13, 2022
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
120 changes: 108 additions & 12 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,15 @@ grpc_cc_library(
"channel_init",
"channel_stack_type",
"config",
"default_event_engine_factory_hdrs",
"gpr_base",
"grpc_authorization_base",
"grpc_base",
"grpc_codegen",
"grpc_common",
"grpc_security_base",
"grpc_trace",
"iomgr_timer",
"slice",
],
)
Expand Down Expand Up @@ -453,6 +455,7 @@ grpc_cc_library(
"channel_init",
"channel_stack_type",
"config",
"default_event_engine_factory_hdrs",
"gpr_base",
"grpc_authorization_base",
"grpc_base",
Expand All @@ -461,6 +464,7 @@ grpc_cc_library(
"grpc_secure",
"grpc_security_base",
"grpc_trace",
"iomgr_timer",
"slice",
],
)
Expand Down Expand Up @@ -1760,6 +1764,41 @@ grpc_cc_library(
],
)

grpc_cc_library(
name = "iomgr_timer",
srcs = [
"src/core/lib/iomgr/time_averaged_stats.cc",
"src/core/lib/iomgr/timer.cc",
"src/core/lib/iomgr/timer_generic.cc",
"src/core/lib/iomgr/timer_heap.cc",
"src/core/lib/iomgr/timer_manager.cc",
],
hdrs = [
"src/core/lib/iomgr/timer.h",
"src/core/lib/iomgr/timer_generic.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/timer_manager.h",
"src/core/lib/iomgr/time_averaged_stats.h",
] + [
# TODO(hork): deduplicate
"src/core/lib/iomgr/iomgr.h",
],
external_deps = [
"absl/strings",
],
deps = [
"event_engine_base_hdrs",
"exec_ctx",
"gpr_base",
"gpr_platform",
"gpr_tls",
"grpc_trace",
"iomgr_port",
"time",
"useful",
],
)

grpc_cc_library(
name = "iomgr_fwd",
hdrs = [
Expand Down Expand Up @@ -1829,13 +1868,39 @@ grpc_cc_library(
srcs = [
"src/core/lib/event_engine/default_event_engine_factory.cc",
],
external_deps = ["absl/memory"],
deps = [
"default_event_engine_factory_hdrs",
"event_engine_base_hdrs",
"gpr_base",
"iomgr_event_engine",
"iomgr_port",
],
)

grpc_cc_library(
name = "iomgr_event_engine",
srcs = ["src/core/lib/event_engine/iomgr_engine.cc"],
hdrs = ["src/core/lib/event_engine/iomgr_engine.h"],
external_deps = [
# TODO(hork): uv, in a subsequent PR
"absl/cleanup",
"absl/container:flat_hash_set",
"absl/time",
"absl/strings",
],
deps = [
"default_event_engine_factory_hdrs",
"closure",
"error",
"event_engine_base_hdrs",
"event_engine_common",
"event_engine_trace",
"exec_ctx",
"gpr_base",
"gpr_platform",
"grpc_trace",
"iomgr_timer",
"match",
"time",
],
)

Expand All @@ -1846,8 +1911,15 @@ grpc_cc_library(
"src/core/lib/event_engine/slice.cc",
"src/core/lib/event_engine/slice_buffer.cc",
],
hdrs = [
"src/core/lib/event_engine/handle_containers.h",
],
external_deps = [
"absl/container:flat_hash_set",
],
deps = [
"event_engine_base_hdrs",
"event_engine_trace",
"gpr_base",
"gpr_platform",
"ref_counted",
Expand All @@ -1856,6 +1928,20 @@ grpc_cc_library(
],
)

grpc_cc_library(
name = "event_engine_trace",
srcs = [
"src/core/lib/event_engine/trace.cc",
],
hdrs = [
"src/core/lib/event_engine/trace.h",
],
deps = [
"gpr_platform",
"grpc_trace",
],
)

grpc_cc_library(
name = "event_engine_base",
srcs = [
Expand All @@ -1865,7 +1951,9 @@ grpc_cc_library(
"default_event_engine_factory",
"default_event_engine_factory_hdrs",
"event_engine_base_hdrs",
"event_engine_trace",
"gpr_base",
"grpc_trace",
],
)

Expand Down Expand Up @@ -1996,11 +2084,6 @@ grpc_cc_library(
"src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc",
"src/core/lib/iomgr/tcp_server_windows.cc",
"src/core/lib/iomgr/tcp_windows.cc",
"src/core/lib/iomgr/time_averaged_stats.cc",
"src/core/lib/iomgr/timer.cc",
"src/core/lib/iomgr/timer_generic.cc",
"src/core/lib/iomgr/timer_heap.cc",
"src/core/lib/iomgr/timer_manager.cc",
"src/core/lib/iomgr/unix_sockets_posix.cc",
"src/core/lib/iomgr/unix_sockets_posix_noop.cc",
"src/core/lib/iomgr/wakeup_fd_eventfd.cc",
Expand Down Expand Up @@ -2124,11 +2207,6 @@ grpc_cc_library(
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_server_utils_posix.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
"src/core/lib/iomgr/timer_generic.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/timer_manager.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.h",
Expand Down Expand Up @@ -2234,6 +2312,7 @@ grpc_cc_library(
"grpc_sockaddr",
"grpc_trace",
"iomgr_port",
"iomgr_timer",
"json",
"latch",
"memory_quota",
Expand Down Expand Up @@ -2609,6 +2688,7 @@ grpc_cc_library(
"handshaker_registry",
"httpcli",
"iomgr_fwd",
"iomgr_timer",
"json",
"json_util",
"orphanable",
Expand Down Expand Up @@ -2693,6 +2773,7 @@ grpc_cc_library(
"gpr_base",
"grpc_base",
"idle_filter_state",
"iomgr_timer",
"loop",
"promise",
"single_set_ptr",
Expand All @@ -2714,6 +2795,7 @@ grpc_cc_library(
"config",
"gpr_base",
"grpc_base",
"iomgr_timer",
"slice",
],
)
Expand Down Expand Up @@ -2920,6 +3002,7 @@ grpc_cc_library(
"grpc_sockaddr",
"grpc_trace",
"grpc_transport_chttp2_client_connector",
"iomgr_timer",
"json",
"orphanable",
"protobuf_duration_upb",
Expand Down Expand Up @@ -2969,6 +3052,7 @@ grpc_cc_library(
"grpc_security_base",
"grpc_service_config_impl",
"grpc_trace",
"iomgr_timer",
"json",
"json_util",
"orphanable",
Expand Down Expand Up @@ -3099,6 +3183,7 @@ grpc_cc_library(
"grpc_sockaddr",
"grpc_tls_credentials",
"grpc_transport_chttp2_client_connector",
"iomgr_timer",
"json",
"json_util",
"orphanable",
Expand Down Expand Up @@ -3342,6 +3427,7 @@ grpc_cc_library(
"grpc_codegen",
"grpc_resolver_xds_header",
"grpc_trace",
"iomgr_timer",
"json",
"orphanable",
"ref_counted",
Expand Down Expand Up @@ -3500,6 +3586,7 @@ grpc_cc_library(
"grpc_codegen",
"grpc_lb_address_filtering",
"grpc_trace",
"iomgr_timer",
"json",
"orphanable",
"ref_counted",
Expand Down Expand Up @@ -3530,6 +3617,7 @@ grpc_cc_library(
"grpc_codegen",
"grpc_lb_address_filtering",
"grpc_trace",
"iomgr_timer",
"json",
"orphanable",
"ref_counted",
Expand Down Expand Up @@ -3702,6 +3790,7 @@ grpc_cc_library(
"gpr_base",
"grpc_base",
"grpc_resolver",
"iomgr_timer",
"orphanable",
"ref_counted_ptr",
"uri_parser",
Expand Down Expand Up @@ -3747,6 +3836,7 @@ grpc_cc_library(
"grpc_resolver",
"grpc_resolver_dns_selection",
"grpc_trace",
"iomgr_timer",
"orphanable",
"polling_resolver",
"ref_counted_ptr",
Expand Down Expand Up @@ -3802,6 +3892,7 @@ grpc_cc_library(
"grpc_trace",
"iomgr_fwd",
"iomgr_port",
"iomgr_timer",
"json",
"orphanable",
"polling_resolver",
Expand Down Expand Up @@ -4908,6 +4999,7 @@ grpc_cc_library(
"hpack_encoder_table",
"httpcli",
"iomgr_fwd",
"iomgr_timer",
"memory_quota",
"orphanable",
"pid_controller",
Expand Down Expand Up @@ -5005,6 +5097,7 @@ grpc_cc_library(
"grpc_transport_chttp2",
"handshaker_registry",
"iomgr_fwd",
"iomgr_timer",
"memory_quota",
"orphanable",
"ref_counted",
Expand Down Expand Up @@ -5134,6 +5227,7 @@ grpc_cc_library(
"grpc_service_config_impl",
"grpc_trace",
"grpc_transport_inproc",
"iomgr_timer",
"ref_counted",
"useful",
],
Expand Down Expand Up @@ -5168,6 +5262,7 @@ grpc_cc_library(
"grpc_trace",
"grpc_transport_inproc",
"grpc_unsecure",
"iomgr_timer",
"ref_counted",
"useful",
],
Expand Down Expand Up @@ -5342,6 +5437,7 @@ grpc_cc_library(
"grpc++",
"grpc++_codegen_base",
"grpc_base",
"iomgr_timer",
"protobuf_duration_upb",
"ref_counted",
"time",
Expand Down
Loading