grpc 1.3.4 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (286) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +581 -450
  3. data/include/grpc/census.h +49 -49
  4. data/include/grpc/grpc.h +16 -70
  5. data/include/grpc/grpc_security.h +59 -59
  6. data/include/grpc/grpc_security_constants.h +9 -9
  7. data/include/grpc/impl/codegen/atm.h +1 -1
  8. data/include/grpc/impl/codegen/atm_windows.h +4 -4
  9. data/include/grpc/impl/codegen/byte_buffer_reader.h +2 -2
  10. data/include/grpc/impl/codegen/compression_types.h +4 -5
  11. data/include/grpc/impl/codegen/gpr_slice.h +5 -5
  12. data/include/grpc/impl/codegen/gpr_types.h +6 -7
  13. data/include/grpc/impl/codegen/grpc_types.h +128 -59
  14. data/include/grpc/impl/codegen/port_platform.h +6 -0
  15. data/include/grpc/impl/codegen/propagation_bits.h +2 -2
  16. data/include/grpc/impl/codegen/slice.h +13 -12
  17. data/include/grpc/impl/codegen/status.h +23 -18
  18. data/include/grpc/impl/codegen/sync.h +1 -1
  19. data/include/grpc/load_reporting.h +6 -6
  20. data/include/grpc/slice.h +47 -25
  21. data/include/grpc/slice_buffer.h +18 -14
  22. data/include/grpc/support/alloc.h +7 -7
  23. data/include/grpc/support/cmdline.h +10 -10
  24. data/include/grpc/support/cpu.h +3 -3
  25. data/include/grpc/support/histogram.h +1 -1
  26. data/include/grpc/support/host_port.h +2 -2
  27. data/include/grpc/support/log.h +9 -9
  28. data/include/grpc/support/log_windows.h +1 -1
  29. data/include/grpc/support/string_util.h +3 -3
  30. data/include/grpc/support/subprocess.h +3 -3
  31. data/include/grpc/support/sync.h +31 -31
  32. data/include/grpc/support/thd.h +11 -11
  33. data/include/grpc/support/time.h +12 -12
  34. data/include/grpc/support/tls.h +1 -1
  35. data/include/grpc/support/tls_gcc.h +2 -2
  36. data/include/grpc/support/tls_msvc.h +1 -1
  37. data/include/grpc/support/tls_pthread.h +1 -1
  38. data/include/grpc/support/useful.h +2 -2
  39. data/include/grpc/support/workaround_list.h +46 -0
  40. data/src/core/ext/census/context.c +1 -1
  41. data/src/core/ext/census/intrusive_hash_map.c +319 -0
  42. data/src/core/ext/census/intrusive_hash_map.h +167 -0
  43. data/src/core/ext/census/intrusive_hash_map_internal.h +63 -0
  44. data/src/core/ext/census/resource.c +3 -1
  45. data/src/core/ext/filters/client_channel/channel_connectivity.c +1 -1
  46. data/src/core/ext/filters/client_channel/client_channel.c +173 -103
  47. data/src/core/ext/filters/client_channel/client_channel_plugin.c +3 -2
  48. data/src/core/ext/filters/client_channel/lb_policy.c +2 -1
  49. data/src/core/ext/filters/client_channel/lb_policy.h +8 -7
  50. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c +153 -0
  51. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +42 -0
  52. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c +405 -102
  53. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c +133 -0
  54. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +65 -0
  55. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c +90 -51
  56. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +7 -1
  57. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +19 -8
  58. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +63 -34
  59. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c +2 -1
  60. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c +188 -294
  61. data/src/core/ext/filters/client_channel/lb_policy_factory.c +28 -5
  62. data/src/core/ext/filters/client_channel/lb_policy_factory.h +18 -4
  63. data/src/core/ext/filters/client_channel/parse_address.c +90 -59
  64. data/src/core/ext/filters/client_channel/parse_address.h +17 -8
  65. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c +11 -7
  66. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +59 -14
  67. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +6 -0
  68. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c +3 -3
  69. data/src/core/ext/filters/client_channel/subchannel.c +20 -17
  70. data/src/core/ext/filters/client_channel/subchannel.h +1 -0
  71. data/src/core/ext/filters/client_channel/subchannel_index.c +11 -1
  72. data/src/core/ext/filters/client_channel/uri_parser.c +36 -22
  73. data/src/core/ext/filters/client_channel/uri_parser.h +1 -1
  74. data/src/core/{lib/channel → ext/filters/deadline}/deadline_filter.c +42 -17
  75. data/src/core/{lib/channel → ext/filters/deadline}/deadline_filter.h +8 -9
  76. data/src/core/{lib/channel → ext/filters/http/client}/http_client_filter.c +19 -11
  77. data/src/core/{lib/channel → ext/filters/http/client}/http_client_filter.h +3 -6
  78. data/src/core/ext/filters/http/http_filters_plugin.c +104 -0
  79. data/src/core/{lib/channel/compress_filter.c → ext/filters/http/message_compress/message_compress_filter.c} +124 -23
  80. data/src/core/{lib/channel/compress_filter.h → ext/filters/http/message_compress/message_compress_filter.h} +5 -6
  81. data/src/core/{lib/channel → ext/filters/http/server}/http_server_filter.c +4 -6
  82. data/src/core/{lib/channel → ext/filters/http/server}/http_server_filter.h +3 -3
  83. data/src/core/ext/filters/load_reporting/load_reporting.c +2 -25
  84. data/src/core/ext/filters/load_reporting/load_reporting_filter.c +26 -1
  85. data/src/core/ext/filters/max_age/max_age_filter.c +14 -14
  86. data/src/core/{lib/channel → ext/filters/message_size}/message_size_filter.c +91 -47
  87. data/src/core/{lib/channel → ext/filters/message_size}/message_size_filter.h +3 -3
  88. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c +223 -0
  89. data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h +40 -0
  90. data/src/core/ext/filters/workarounds/workaround_utils.c +65 -0
  91. data/src/core/ext/filters/workarounds/workaround_utils.h +52 -0
  92. data/src/core/ext/transport/chttp2/client/insecure/channel_create.c +1 -1
  93. data/src/core/ext/transport/chttp2/server/chttp2_server.c +3 -2
  94. data/src/core/ext/transport/chttp2/transport/bin_decoder.c +2 -2
  95. data/src/core/ext/transport/chttp2/transport/bin_encoder.c +3 -3
  96. data/src/core/ext/transport/chttp2/transport/chttp2_transport.c +319 -175
  97. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +3 -2
  98. data/src/core/ext/transport/chttp2/transport/frame_data.c +203 -164
  99. data/src/core/ext/transport/chttp2/transport/frame_data.h +8 -14
  100. data/src/core/ext/transport/chttp2/transport/frame_goaway.c +1 -1
  101. data/src/core/ext/transport/chttp2/transport/frame_ping.c +1 -1
  102. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +1 -1
  103. data/src/core/ext/transport/chttp2/transport/frame_settings.c +5 -5
  104. data/src/core/ext/transport/chttp2/transport/frame_window_update.c +1 -1
  105. data/src/core/ext/transport/chttp2/transport/hpack_encoder.c +4 -4
  106. data/src/core/ext/transport/chttp2/transport/hpack_parser.c +2 -4
  107. data/src/core/ext/transport/chttp2/transport/hpack_table.c +4 -3
  108. data/src/core/ext/transport/chttp2/transport/internal.h +50 -33
  109. data/src/core/ext/transport/chttp2/transport/parsing.c +10 -11
  110. data/src/core/ext/transport/chttp2/transport/writing.c +32 -13
  111. data/src/core/lib/channel/channel_args.c +30 -9
  112. data/src/core/lib/channel/channel_args.h +5 -1
  113. data/src/core/lib/channel/channel_stack.c +1 -1
  114. data/src/core/lib/channel/channel_stack.h +2 -2
  115. data/src/core/lib/channel/channel_stack_builder.c +13 -1
  116. data/src/core/lib/channel/channel_stack_builder.h +5 -1
  117. data/src/core/lib/channel/connected_channel.c +3 -1
  118. data/src/core/lib/channel/context.h +2 -2
  119. data/src/core/lib/compression/message_compress.c +2 -2
  120. data/src/core/lib/debug/trace.c +13 -6
  121. data/src/core/lib/debug/trace.h +27 -1
  122. data/src/core/lib/http/httpcli.c +1 -1
  123. data/src/core/lib/http/httpcli_security_connector.c +9 -11
  124. data/src/core/lib/http/parser.c +2 -2
  125. data/src/core/lib/http/parser.h +2 -1
  126. data/src/core/lib/iomgr/combiner.c +6 -6
  127. data/src/core/lib/iomgr/combiner.h +2 -1
  128. data/src/core/lib/iomgr/error.c +12 -5
  129. data/src/core/lib/iomgr/error.h +13 -13
  130. data/src/core/lib/iomgr/ev_epoll1_linux.c +984 -0
  131. data/src/core/lib/iomgr/ev_epoll1_linux.h +44 -0
  132. data/src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c +2146 -0
  133. data/src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h +43 -0
  134. data/src/core/lib/iomgr/ev_epoll_thread_pool_linux.c +1337 -0
  135. data/src/core/lib/iomgr/ev_epoll_thread_pool_linux.h +43 -0
  136. data/src/core/lib/iomgr/ev_epollex_linux.c +1511 -0
  137. data/src/core/lib/iomgr/ev_epollex_linux.h +43 -0
  138. data/src/core/lib/iomgr/{ev_epoll_linux.c → ev_epollsig_linux.c} +41 -33
  139. data/src/core/lib/iomgr/{ev_epoll_linux.h → ev_epollsig_linux.h} +4 -4
  140. data/src/core/lib/iomgr/ev_poll_posix.c +12 -27
  141. data/src/core/lib/iomgr/ev_poll_posix.h +2 -2
  142. data/src/core/lib/iomgr/ev_posix.c +22 -8
  143. data/src/core/lib/iomgr/ev_posix.h +4 -3
  144. data/src/core/lib/iomgr/ev_windows.c +43 -0
  145. data/src/core/lib/iomgr/exec_ctx.c +5 -0
  146. data/src/core/lib/iomgr/exec_ctx.h +2 -0
  147. data/src/core/lib/iomgr/iomgr.c +4 -0
  148. data/src/core/lib/iomgr/iomgr.h +3 -0
  149. data/src/core/lib/iomgr/is_epollexclusive_available.c +116 -0
  150. data/src/core/lib/iomgr/is_epollexclusive_available.h +41 -0
  151. data/src/core/lib/iomgr/lockfree_event.c +16 -0
  152. data/src/core/lib/iomgr/pollset.h +2 -5
  153. data/src/core/lib/iomgr/pollset_uv.c +1 -1
  154. data/src/core/lib/iomgr/pollset_windows.c +3 -3
  155. data/src/core/lib/iomgr/resource_quota.c +9 -8
  156. data/src/core/lib/iomgr/resource_quota.h +2 -1
  157. data/src/core/lib/iomgr/sockaddr_utils.h +1 -1
  158. data/src/core/lib/iomgr/socket_mutator.h +2 -0
  159. data/src/core/lib/iomgr/sys_epoll_wrapper.h +43 -0
  160. data/src/core/lib/iomgr/tcp_client_posix.c +6 -6
  161. data/src/core/lib/iomgr/tcp_client_uv.c +3 -3
  162. data/src/core/lib/iomgr/tcp_posix.c +7 -7
  163. data/src/core/lib/iomgr/tcp_posix.h +2 -1
  164. data/src/core/lib/iomgr/tcp_server_posix.c +1 -1
  165. data/src/core/lib/iomgr/tcp_uv.c +6 -6
  166. data/src/core/lib/iomgr/tcp_uv.h +2 -1
  167. data/src/core/lib/iomgr/tcp_windows.c +1 -1
  168. data/src/core/lib/iomgr/timer_generic.c +24 -25
  169. data/src/core/lib/iomgr/timer_manager.c +276 -0
  170. data/src/core/lib/iomgr/timer_manager.h +52 -0
  171. data/src/core/lib/iomgr/timer_uv.c +6 -0
  172. data/src/core/lib/iomgr/udp_server.c +42 -9
  173. data/src/core/lib/iomgr/udp_server.h +3 -1
  174. data/src/core/lib/security/credentials/credentials.c +0 -1
  175. data/src/core/lib/security/credentials/fake/fake_credentials.c +23 -0
  176. data/src/core/lib/security/credentials/fake/fake_credentials.h +12 -9
  177. data/src/core/lib/security/credentials/google_default/google_default_credentials.c +1 -1
  178. data/src/core/lib/security/credentials/jwt/jwt_credentials.c +1 -1
  179. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +1 -1
  180. data/src/core/lib/security/credentials/ssl/ssl_credentials.c +24 -53
  181. data/src/core/lib/security/transport/client_auth_filter.c +9 -3
  182. data/src/core/lib/security/transport/secure_endpoint.c +7 -7
  183. data/src/core/lib/security/transport/secure_endpoint.h +1 -1
  184. data/src/core/lib/security/transport/security_connector.c +45 -57
  185. data/src/core/lib/security/transport/security_connector.h +10 -14
  186. data/src/core/lib/security/transport/security_handshaker.c +123 -97
  187. data/src/core/lib/slice/b64.c +1 -1
  188. data/src/core/lib/slice/percent_encoding.c +3 -3
  189. data/src/core/lib/slice/slice.c +66 -33
  190. data/src/core/lib/slice/slice_buffer.c +25 -6
  191. data/src/core/lib/slice/slice_hash_table.c +33 -35
  192. data/src/core/lib/slice/slice_hash_table.h +7 -12
  193. data/src/core/lib/support/atomic.h +45 -0
  194. data/src/core/lib/support/atomic_with_atm.h +70 -0
  195. data/src/core/lib/support/atomic_with_std.h +48 -0
  196. data/src/core/lib/support/avl.c +14 -14
  197. data/src/core/lib/support/cmdline.c +3 -3
  198. data/src/core/lib/support/histogram.c +2 -2
  199. data/src/core/lib/support/host_port.c +1 -1
  200. data/src/core/lib/support/memory.h +74 -0
  201. data/src/core/lib/support/mpscq.c +36 -2
  202. data/src/core/lib/support/mpscq.h +28 -1
  203. data/src/core/lib/support/stack_lockfree.c +3 -36
  204. data/src/core/lib/support/string.c +12 -12
  205. data/src/core/lib/support/string_posix.c +1 -1
  206. data/src/core/lib/support/subprocess_posix.c +2 -2
  207. data/src/core/lib/support/thd_posix.c +1 -1
  208. data/src/core/lib/support/time_posix.c +8 -0
  209. data/src/core/lib/support/tmpfile_posix.c +10 -10
  210. data/src/core/lib/surface/alarm.c +3 -1
  211. data/src/core/lib/surface/api_trace.c +2 -1
  212. data/src/core/lib/surface/api_trace.h +2 -2
  213. data/src/core/lib/surface/byte_buffer_reader.c +1 -1
  214. data/src/core/lib/surface/call.c +65 -22
  215. data/src/core/lib/surface/call.h +4 -2
  216. data/src/core/lib/surface/channel_init.c +2 -19
  217. data/src/core/lib/surface/channel_stack_type.c +18 -0
  218. data/src/core/lib/surface/channel_stack_type.h +2 -0
  219. data/src/core/lib/surface/completion_queue.c +694 -247
  220. data/src/core/lib/surface/completion_queue.h +30 -13
  221. data/src/core/lib/surface/completion_queue_factory.c +24 -9
  222. data/src/core/lib/surface/init.c +1 -52
  223. data/src/core/lib/surface/{lame_client.c → lame_client.cc} +37 -26
  224. data/src/core/lib/surface/server.c +79 -110
  225. data/src/core/lib/surface/server.h +2 -1
  226. data/src/core/lib/surface/version.c +2 -2
  227. data/src/core/lib/transport/bdp_estimator.c +25 -9
  228. data/src/core/lib/transport/bdp_estimator.h +7 -1
  229. data/src/core/lib/transport/byte_stream.c +23 -9
  230. data/src/core/lib/transport/byte_stream.h +15 -6
  231. data/src/core/lib/transport/connectivity_state.c +6 -6
  232. data/src/core/lib/transport/connectivity_state.h +2 -1
  233. data/src/core/lib/transport/service_config.c +6 -13
  234. data/src/core/lib/transport/service_config.h +2 -2
  235. data/src/core/lib/transport/static_metadata.c +403 -389
  236. data/src/core/lib/transport/static_metadata.h +127 -114
  237. data/src/core/plugin_registry/grpc_plugin_registry.c +16 -0
  238. data/src/core/tsi/fake_transport_security.c +5 -4
  239. data/src/core/tsi/ssl_transport_security.c +71 -82
  240. data/src/core/tsi/ssl_transport_security.h +39 -61
  241. data/src/core/tsi/transport_security.c +83 -2
  242. data/src/core/tsi/transport_security.h +27 -2
  243. data/src/core/tsi/transport_security_adapter.c +236 -0
  244. data/src/core/tsi/transport_security_adapter.h +62 -0
  245. data/src/core/tsi/transport_security_interface.h +179 -66
  246. data/src/ruby/ext/grpc/extconf.rb +2 -1
  247. data/src/ruby/ext/grpc/rb_byte_buffer.c +8 -6
  248. data/src/ruby/ext/grpc/rb_call.c +56 -48
  249. data/src/ruby/ext/grpc/rb_call.h +3 -4
  250. data/src/ruby/ext/grpc/rb_call_credentials.c +23 -22
  251. data/src/ruby/ext/grpc/rb_channel.c +2 -3
  252. data/src/ruby/ext/grpc/rb_channel_args.c +11 -9
  253. data/src/ruby/ext/grpc/rb_channel_credentials.c +16 -12
  254. data/src/ruby/ext/grpc/rb_completion_queue.c +7 -9
  255. data/src/ruby/ext/grpc/rb_compression_options.c +7 -6
  256. data/src/ruby/ext/grpc/rb_event_thread.c +10 -12
  257. data/src/ruby/ext/grpc/rb_event_thread.h +1 -2
  258. data/src/ruby/ext/grpc/rb_grpc.c +11 -15
  259. data/src/ruby/ext/grpc/rb_grpc.h +2 -2
  260. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +16 -6
  261. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +25 -10
  262. data/src/ruby/ext/grpc/rb_server.c +26 -28
  263. data/src/ruby/lib/grpc/grpc.rb +1 -1
  264. data/src/ruby/lib/grpc/version.rb +1 -1
  265. data/third_party/cares/config_linux/ares_config.h +36 -2
  266. data/third_party/zlib/adler32.c +14 -7
  267. data/third_party/zlib/compress.c +24 -18
  268. data/third_party/zlib/crc32.c +29 -12
  269. data/third_party/zlib/deflate.c +499 -303
  270. data/third_party/zlib/deflate.h +19 -16
  271. data/third_party/zlib/gzguts.h +16 -7
  272. data/third_party/zlib/gzlib.c +17 -14
  273. data/third_party/zlib/gzread.c +108 -48
  274. data/third_party/zlib/gzwrite.c +210 -122
  275. data/third_party/zlib/infback.c +2 -2
  276. data/third_party/zlib/inffast.c +34 -51
  277. data/third_party/zlib/inflate.c +86 -37
  278. data/third_party/zlib/inflate.h +7 -4
  279. data/third_party/zlib/inftrees.c +12 -14
  280. data/third_party/zlib/trees.c +38 -61
  281. data/third_party/zlib/uncompr.c +66 -32
  282. data/third_party/zlib/zconf.h +32 -9
  283. data/third_party/zlib/zlib.h +298 -154
  284. data/third_party/zlib/zutil.c +25 -24
  285. data/third_party/zlib/zutil.h +35 -17
  286. metadata +63 -30
@@ -0,0 +1,43 @@
1
+ /*
2
+ *
3
+ * Copyright 2015, Google Inc.
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are
8
+ * met:
9
+ *
10
+ * * Redistributions of source code must retain the above copyright
11
+ * notice, this list of conditions and the following disclaimer.
12
+ * * Redistributions in binary form must reproduce the above
13
+ * copyright notice, this list of conditions and the following disclaimer
14
+ * in the documentation and/or other materials provided with the
15
+ * distribution.
16
+ * * Neither the name of Google Inc. nor the names of its
17
+ * contributors may be used to endorse or promote products derived from
18
+ * this software without specific prior written permission.
19
+ *
20
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ *
32
+ */
33
+
34
+ #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H
35
+ #define GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H
36
+
37
+ #include "src/core/lib/iomgr/ev_posix.h"
38
+ #include "src/core/lib/iomgr/port.h"
39
+
40
+ const grpc_event_engine_vtable *grpc_init_epollex_linux(
41
+ bool explicitly_requested);
42
+
43
+ #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H */
@@ -36,7 +36,7 @@
36
36
  /* This polling engine is only relevant on linux kernels supporting epoll() */
37
37
  #ifdef GRPC_LINUX_EPOLL
38
38
 
39
- #include "src/core/lib/iomgr/ev_epoll_linux.h"
39
+ #include "src/core/lib/iomgr/ev_epollsig_linux.h"
40
40
 
41
41
  #include <assert.h>
42
42
  #include <errno.h>
@@ -63,11 +63,11 @@
63
63
  #include "src/core/lib/profiling/timers.h"
64
64
  #include "src/core/lib/support/block_annotate.h"
65
65
 
66
- /* TODO: sreek - Move this to init.c and initialize this like other tracers. */
67
- static int grpc_polling_trace = 0; /* Disabled by default */
68
- #define GRPC_POLLING_TRACE(fmt, ...) \
69
- if (grpc_polling_trace) { \
70
- gpr_log(GPR_INFO, (fmt), __VA_ARGS__); \
66
+ #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
67
+
68
+ #define GRPC_POLLING_TRACE(...) \
69
+ if (GRPC_TRACER_ON(grpc_polling_trace)) { \
70
+ gpr_log(GPR_INFO, __VA_ARGS__); \
71
71
  }
72
72
 
73
73
  /* Uncomment the following to enable extra checks on poll_object operations */
@@ -76,11 +76,6 @@ static int grpc_polling_trace = 0; /* Disabled by default */
76
76
  static int grpc_wakeup_signal = -1;
77
77
  static bool is_grpc_wakeup_signal_initialized = false;
78
78
 
79
- /* TODO: sreek: Right now, this wakes up all pollers. In future we should make
80
- * sure to wake up one polling thread (which can wake up other threads if
81
- * needed) */
82
- static grpc_wakeup_fd global_wakeup_fd;
83
-
84
79
  /* Implements the function defined in grpc_posix.h. This function might be
85
80
  * called before even calling grpc_init() to set either a different signal to
86
81
  * use. If signum == -1, then the use of signals is disabled */
@@ -454,8 +449,8 @@ static void polling_island_add_wakeup_fd_locked(polling_island *pi,
454
449
  gpr_asprintf(&err_msg,
455
450
  "epoll_ctl (epoll_fd: %d) add wakeup fd: %d failed with "
456
451
  "error: %d (%s)",
457
- pi->epoll_fd, GRPC_WAKEUP_FD_GET_READ_FD(&global_wakeup_fd),
458
- errno, strerror(errno));
452
+ pi->epoll_fd, GRPC_WAKEUP_FD_GET_READ_FD(wakeup_fd), errno,
453
+ strerror(errno));
459
454
  append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc);
460
455
  gpr_free(err_msg);
461
456
  }
@@ -558,7 +553,6 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx,
558
553
  goto done;
559
554
  }
560
555
 
561
- polling_island_add_wakeup_fd_locked(pi, &global_wakeup_fd, error);
562
556
  polling_island_add_wakeup_fd_locked(pi, &pi->workqueue_wakeup_fd, error);
563
557
 
564
558
  if (initial_fd != NULL) {
@@ -738,7 +732,7 @@ static void workqueue_maybe_wakeup(polling_island *pi) {
738
732
  it right now. Note that since we do an anticipatory mpscq_pop every poll
739
733
  loop, it's ok if we miss the wakeup here, as we'll get the work item when
740
734
  the next poller enters anyway. */
741
- if (current_pollers > min_current_pollers_for_wakeup) {
735
+ if (current_pollers >= min_current_pollers_for_wakeup) {
742
736
  GRPC_LOG_IF_ERROR("workqueue_wakeup_fd",
743
737
  grpc_wakeup_fd_wakeup(&pi->workqueue_wakeup_fd));
744
738
  }
@@ -1116,11 +1110,10 @@ static grpc_error *pollset_global_init(void) {
1116
1110
  gpr_tls_init(&g_current_thread_pollset);
1117
1111
  gpr_tls_init(&g_current_thread_worker);
1118
1112
  poller_kick_init();
1119
- return grpc_wakeup_fd_init(&global_wakeup_fd);
1113
+ return GRPC_ERROR_NONE;
1120
1114
  }
1121
1115
 
1122
1116
  static void pollset_global_shutdown(void) {
1123
- grpc_wakeup_fd_destroy(&global_wakeup_fd);
1124
1117
  gpr_tls_destroy(&g_current_thread_pollset);
1125
1118
  gpr_tls_destroy(&g_current_thread_worker);
1126
1119
  }
@@ -1226,10 +1219,6 @@ static grpc_error *pollset_kick(grpc_pollset *p,
1226
1219
  return error;
1227
1220
  }
1228
1221
 
1229
- static grpc_error *kick_poller(void) {
1230
- return grpc_wakeup_fd_wakeup(&global_wakeup_fd);
1231
- }
1232
-
1233
1222
  static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) {
1234
1223
  gpr_mu_init(&pollset->po.mu);
1235
1224
  *mu = &pollset->po.mu;
@@ -1332,7 +1321,7 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
1332
1321
  /* pollset_shutdown is guaranteed to be called before pollset_destroy. So other
1333
1322
  * than destroying the mutexes, there is nothing special that needs to be done
1334
1323
  * here */
1335
- static void pollset_destroy(grpc_pollset *pollset) {
1324
+ static void pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
1336
1325
  GPR_ASSERT(!pollset_has_workers(pollset));
1337
1326
  gpr_mu_destroy(&pollset->po.mu);
1338
1327
  }
@@ -1343,7 +1332,13 @@ static bool maybe_do_workqueue_work(grpc_exec_ctx *exec_ctx,
1343
1332
  gpr_mpscq_node *n = gpr_mpscq_pop(&pi->workqueue_items);
1344
1333
  gpr_mu_unlock(&pi->workqueue_read_mu);
1345
1334
  if (n != NULL) {
1346
- if (gpr_atm_full_fetch_add(&pi->workqueue_item_count, -1) > 1) {
1335
+ gpr_atm remaining =
1336
+ gpr_atm_full_fetch_add(&pi->workqueue_item_count, -1) - 1;
1337
+ GRPC_POLLING_TRACE(
1338
+ "maybe_do_workqueue_work: pi: %p: got closure %p, remaining = "
1339
+ "%" PRIdPTR,
1340
+ pi, n, remaining);
1341
+ if (remaining > 0) {
1347
1342
  workqueue_maybe_wakeup(pi);
1348
1343
  }
1349
1344
  grpc_closure *c = (grpc_closure *)n;
@@ -1358,8 +1353,13 @@ static bool maybe_do_workqueue_work(grpc_exec_ctx *exec_ctx,
1358
1353
  /* n == NULL might mean there's work but it's not available to be popped
1359
1354
  * yet - try to ensure another workqueue wakes up to check shortly if so
1360
1355
  */
1356
+ GRPC_POLLING_TRACE(
1357
+ "maybe_do_workqueue_work: pi: %p: more to do, but not yet", pi);
1361
1358
  workqueue_maybe_wakeup(pi);
1362
1359
  }
1360
+ } else {
1361
+ GRPC_POLLING_TRACE("maybe_do_workqueue_work: pi: %p: read already locked",
1362
+ pi);
1363
1363
  }
1364
1364
  return false;
1365
1365
  }
@@ -1422,7 +1422,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx,
1422
1422
  /* If we get some workqueue work to do, it might end up completing an item on
1423
1423
  the completion queue, so there's no need to poll... so we skip that and
1424
1424
  redo the complete loop to verify */
1425
+ GRPC_POLLING_TRACE("pollset_work: pollset: %p, worker %p, pi %p", pollset,
1426
+ worker, pi);
1425
1427
  if (!maybe_do_workqueue_work(exec_ctx, pi)) {
1428
+ GRPC_POLLING_TRACE("pollset_work: begins");
1426
1429
  gpr_atm_no_barrier_fetch_add(&pi->poller_count, 1);
1427
1430
  g_current_thread_polling_island = pi;
1428
1431
 
@@ -1453,11 +1456,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx,
1453
1456
 
1454
1457
  for (int i = 0; i < ep_rv; ++i) {
1455
1458
  void *data_ptr = ep_ev[i].data.ptr;
1456
- if (data_ptr == &global_wakeup_fd) {
1457
- grpc_timer_consume_kick();
1458
- append_error(error, grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd),
1459
- err_desc);
1460
- } else if (data_ptr == &pi->workqueue_wakeup_fd) {
1459
+ if (data_ptr == &pi->workqueue_wakeup_fd) {
1461
1460
  append_error(error,
1462
1461
  grpc_wakeup_fd_consume_wakeup(&pi->workqueue_wakeup_fd),
1463
1462
  err_desc);
@@ -1487,6 +1486,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx,
1487
1486
 
1488
1487
  g_current_thread_polling_island = NULL;
1489
1488
  gpr_atm_no_barrier_fetch_add(&pi->poller_count, -1);
1489
+ GRPC_POLLING_TRACE("pollset_work: ends");
1490
1490
  }
1491
1491
 
1492
1492
  GPR_ASSERT(pi != NULL);
@@ -1897,8 +1897,6 @@ static const grpc_event_engine_vtable vtable = {
1897
1897
  .pollset_set_add_fd = pollset_set_add_fd,
1898
1898
  .pollset_set_del_fd = pollset_set_del_fd,
1899
1899
 
1900
- .kick_poller = kick_poller,
1901
-
1902
1900
  .workqueue_ref = workqueue_ref,
1903
1901
  .workqueue_unref = workqueue_unref,
1904
1902
  .workqueue_scheduler = workqueue_scheduler,
@@ -1921,7 +1919,8 @@ static bool is_epoll_available() {
1921
1919
  return true;
1922
1920
  }
1923
1921
 
1924
- const grpc_event_engine_vtable *grpc_init_epoll_linux(void) {
1922
+ const grpc_event_engine_vtable *grpc_init_epollsig_linux(
1923
+ bool explicit_request) {
1925
1924
  /* If use of signals is disabled, we cannot use epoll engine*/
1926
1925
  if (is_grpc_wakeup_signal_initialized && grpc_wakeup_signal < 0) {
1927
1926
  return NULL;
@@ -1936,7 +1935,13 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) {
1936
1935
  }
1937
1936
 
1938
1937
  if (!is_grpc_wakeup_signal_initialized) {
1939
- grpc_use_signal(SIGRTMIN + 6);
1938
+ /* TODO(ctiller): when other epoll engines are ready, remove the true || to
1939
+ * force this to be explitly chosen if needed */
1940
+ if (true || explicit_request) {
1941
+ grpc_use_signal(SIGRTMIN + 6);
1942
+ } else {
1943
+ return NULL;
1944
+ }
1940
1945
  }
1941
1946
 
1942
1947
  fd_global_init();
@@ -1958,7 +1963,10 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) {
1958
1963
  #include "src/core/lib/iomgr/ev_posix.h"
1959
1964
  /* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return
1960
1965
  * NULL */
1961
- const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; }
1966
+ const grpc_event_engine_vtable *grpc_init_epollsig_linux(
1967
+ bool explicit_request) {
1968
+ return NULL;
1969
+ }
1962
1970
  #endif /* defined(GRPC_POSIX_SOCKET) */
1963
1971
 
1964
1972
  void grpc_use_signal(int signum) {}
@@ -31,13 +31,13 @@
31
31
  *
32
32
  */
33
33
 
34
- #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H
35
- #define GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H
34
+ #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLLSIG_LINUX_H
35
+ #define GRPC_CORE_LIB_IOMGR_EV_EPOLLSIG_LINUX_H
36
36
 
37
37
  #include "src/core/lib/iomgr/ev_posix.h"
38
38
  #include "src/core/lib/iomgr/port.h"
39
39
 
40
- const grpc_event_engine_vtable *grpc_init_epoll_linux(void);
40
+ const grpc_event_engine_vtable *grpc_init_epollsig_linux(bool explicit_request);
41
41
 
42
42
  #ifdef GRPC_LINUX_EPOLL
43
43
  void *grpc_fd_get_polling_island(grpc_fd *fd);
@@ -45,4 +45,4 @@ void *grpc_pollset_get_polling_island(grpc_pollset *ps);
45
45
  bool grpc_are_polling_islands_equal(void *p, void *q);
46
46
  #endif /* defined(GRPC_LINUX_EPOLL) */
47
47
 
48
- #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H */
48
+ #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLSIG_LINUX_H */
@@ -58,6 +58,8 @@
58
58
  #include "src/core/lib/profiling/timers.h"
59
59
  #include "src/core/lib/support/block_annotate.h"
60
60
 
61
+ #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
62
+
61
63
  /*******************************************************************************
62
64
  * FD declarations
63
65
  */
@@ -122,8 +124,6 @@ struct grpc_fd {
122
124
  grpc_pollset *read_notifier_pollset;
123
125
  };
124
126
 
125
- static grpc_wakeup_fd global_wakeup_fd;
126
-
127
127
  /* Begin polling on an fd.
128
128
  Registers that the given pollset is interested in this fd - so that if read
129
129
  or writability interest changes, the pollset can be kicked to pick up that
@@ -784,19 +784,14 @@ static grpc_error *pollset_kick(grpc_pollset *p,
784
784
  static grpc_error *pollset_global_init(void) {
785
785
  gpr_tls_init(&g_current_thread_poller);
786
786
  gpr_tls_init(&g_current_thread_worker);
787
- return grpc_wakeup_fd_init(&global_wakeup_fd);
787
+ return GRPC_ERROR_NONE;
788
788
  }
789
789
 
790
790
  static void pollset_global_shutdown(void) {
791
- grpc_wakeup_fd_destroy(&global_wakeup_fd);
792
791
  gpr_tls_destroy(&g_current_thread_poller);
793
792
  gpr_tls_destroy(&g_current_thread_worker);
794
793
  }
795
794
 
796
- static grpc_error *kick_poller(void) {
797
- return grpc_wakeup_fd_wakeup(&global_wakeup_fd);
798
- }
799
-
800
795
  /* main interface */
801
796
 
802
797
  static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) {
@@ -815,7 +810,7 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) {
815
810
  pollset->pollset_set_count = 0;
816
811
  }
817
812
 
818
- static void pollset_destroy(grpc_pollset *pollset) {
813
+ static void pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
819
814
  GPR_ASSERT(!pollset_has_workers(pollset));
820
815
  GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail);
821
816
  while (pollset->local_wakeup_cache) {
@@ -952,13 +947,10 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
952
947
  }
953
948
 
954
949
  fd_count = 0;
955
- pfd_count = 2;
956
- pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&global_wakeup_fd);
950
+ pfd_count = 1;
951
+ pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker.wakeup_fd->fd);
957
952
  pfds[0].events = POLLIN;
958
953
  pfds[0].revents = 0;
959
- pfds[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker.wakeup_fd->fd);
960
- pfds[1].events = POLLIN;
961
- pfds[1].revents = 0;
962
954
  for (i = 0; i < pollset->fd_count; i++) {
963
955
  if (fd_is_orphaned(pollset->fds[i])) {
964
956
  GRPC_FD_UNREF(pollset->fds[i], "multipoller");
@@ -974,7 +966,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
974
966
  pollset->fd_count = fd_count;
975
967
  gpr_mu_unlock(&pollset->mu);
976
968
 
977
- for (i = 2; i < pfd_count; i++) {
969
+ for (i = 1; i < pfd_count; i++) {
978
970
  grpc_fd *fd = watchers[i].fd;
979
971
  pfds[i].events = (short)fd_begin_poll(fd, pollset, &worker, POLLIN,
980
972
  POLLOUT, &watchers[i]);
@@ -992,7 +984,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
992
984
  work_combine_error(&error, GRPC_OS_ERROR(errno, "poll"));
993
985
  }
994
986
 
995
- for (i = 2; i < pfd_count; i++) {
987
+ for (i = 1; i < pfd_count; i++) {
996
988
  if (watchers[i].fd == NULL) {
997
989
  fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL);
998
990
  } else {
@@ -1002,20 +994,15 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
1002
994
  }
1003
995
  }
1004
996
  } else if (r == 0) {
1005
- for (i = 2; i < pfd_count; i++) {
997
+ for (i = 1; i < pfd_count; i++) {
1006
998
  fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL);
1007
999
  }
1008
1000
  } else {
1009
1001
  if (pfds[0].revents & POLLIN_CHECK) {
1010
- grpc_timer_consume_kick();
1011
- work_combine_error(&error,
1012
- grpc_wakeup_fd_consume_wakeup(&global_wakeup_fd));
1013
- }
1014
- if (pfds[1].revents & POLLIN_CHECK) {
1015
1002
  work_combine_error(
1016
1003
  &error, grpc_wakeup_fd_consume_wakeup(&worker.wakeup_fd->fd));
1017
1004
  }
1018
- for (i = 2; i < pfd_count; i++) {
1005
+ for (i = 1; i < pfd_count; i++) {
1019
1006
  if (watchers[i].fd == NULL) {
1020
1007
  fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL);
1021
1008
  } else {
@@ -1560,8 +1547,6 @@ static const grpc_event_engine_vtable vtable = {
1560
1547
  .pollset_set_add_fd = pollset_set_add_fd,
1561
1548
  .pollset_set_del_fd = pollset_set_del_fd,
1562
1549
 
1563
- .kick_poller = kick_poller,
1564
-
1565
1550
  .workqueue_ref = workqueue_ref,
1566
1551
  .workqueue_unref = workqueue_unref,
1567
1552
  .workqueue_scheduler = workqueue_scheduler,
@@ -1569,7 +1554,7 @@ static const grpc_event_engine_vtable vtable = {
1569
1554
  .shutdown_engine = shutdown_engine,
1570
1555
  };
1571
1556
 
1572
- const grpc_event_engine_vtable *grpc_init_poll_posix(void) {
1557
+ const grpc_event_engine_vtable *grpc_init_poll_posix(bool explicit_request) {
1573
1558
  if (!grpc_has_wakeup_fd()) {
1574
1559
  return NULL;
1575
1560
  }
@@ -1579,7 +1564,7 @@ const grpc_event_engine_vtable *grpc_init_poll_posix(void) {
1579
1564
  return &vtable;
1580
1565
  }
1581
1566
 
1582
- const grpc_event_engine_vtable *grpc_init_poll_cv_posix(void) {
1567
+ const grpc_event_engine_vtable *grpc_init_poll_cv_posix(bool explicit_request) {
1583
1568
  global_cv_fd_table_init();
1584
1569
  grpc_enable_cv_wakeup_fds(1);
1585
1570
  if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) {
@@ -36,7 +36,7 @@
36
36
 
37
37
  #include "src/core/lib/iomgr/ev_posix.h"
38
38
 
39
- const grpc_event_engine_vtable *grpc_init_poll_posix(void);
40
- const grpc_event_engine_vtable *grpc_init_poll_cv_posix(void);
39
+ const grpc_event_engine_vtable *grpc_init_poll_posix(bool explicit_request);
40
+ const grpc_event_engine_vtable *grpc_init_poll_cv_posix(bool explicit_request);
41
41
 
42
42
  #endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */
@@ -44,10 +44,18 @@
44
44
  #include <grpc/support/string_util.h>
45
45
  #include <grpc/support/useful.h>
46
46
 
47
- #include "src/core/lib/iomgr/ev_epoll_linux.h"
47
+ #include "src/core/lib/debug/trace.h"
48
+ #include "src/core/lib/iomgr/ev_epoll1_linux.h"
49
+ #include "src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h"
50
+ #include "src/core/lib/iomgr/ev_epoll_thread_pool_linux.h"
51
+ #include "src/core/lib/iomgr/ev_epollex_linux.h"
52
+ #include "src/core/lib/iomgr/ev_epollsig_linux.h"
48
53
  #include "src/core/lib/iomgr/ev_poll_posix.h"
49
54
  #include "src/core/lib/support/env.h"
50
55
 
56
+ grpc_tracer_flag grpc_polling_trace =
57
+ GRPC_TRACER_INITIALIZER(false); /* Disabled by default */
58
+
51
59
  /** Default poll() function - a pointer so that it can be overridden by some
52
60
  * tests */
53
61
  grpc_poll_function_type grpc_poll_function = poll;
@@ -57,7 +65,8 @@ grpc_wakeup_fd grpc_global_wakeup_fd;
57
65
  static const grpc_event_engine_vtable *g_event_engine;
58
66
  static const char *g_poll_strategy_name = NULL;
59
67
 
60
- typedef const grpc_event_engine_vtable *(*event_engine_factory_fn)(void);
68
+ typedef const grpc_event_engine_vtable *(*event_engine_factory_fn)(
69
+ bool explicit_request);
61
70
 
62
71
  typedef struct {
63
72
  const char *name;
@@ -65,7 +74,11 @@ typedef struct {
65
74
  } event_engine_factory;
66
75
 
67
76
  static const event_engine_factory g_factories[] = {
68
- {"epoll", grpc_init_epoll_linux},
77
+ {"epollex", grpc_init_epollex_linux},
78
+ {"epollsig", grpc_init_epollsig_linux},
79
+ {"epoll1", grpc_init_epoll1_linux},
80
+ {"epoll-threadpool", grpc_init_epoll_thread_pool_linux},
81
+ {"epoll-limited", grpc_init_epoll_limited_pollers_linux},
69
82
  {"poll", grpc_init_poll_posix},
70
83
  {"poll-cv", grpc_init_poll_cv_posix},
71
84
  };
@@ -102,7 +115,8 @@ static bool is(const char *want, const char *have) {
102
115
  static void try_engine(const char *engine) {
103
116
  for (size_t i = 0; i < GPR_ARRAY_SIZE(g_factories); i++) {
104
117
  if (is(engine, g_factories[i].name)) {
105
- if ((g_event_engine = g_factories[i].factory())) {
118
+ if ((g_event_engine = g_factories[i].factory(
119
+ 0 == strcmp(engine, g_factories[i].name)))) {
106
120
  g_poll_strategy_name = g_factories[i].name;
107
121
  gpr_log(GPR_DEBUG, "Using polling engine: %s", g_factories[i].name);
108
122
  return;
@@ -121,6 +135,8 @@ void grpc_set_event_engine_test_only(
121
135
  const char *grpc_get_poll_strategy_name() { return g_poll_strategy_name; }
122
136
 
123
137
  void grpc_event_engine_init(void) {
138
+ grpc_register_tracer("polling", &grpc_polling_trace);
139
+
124
140
  char *s = gpr_getenv("GRPC_POLL_STRATEGY");
125
141
  if (s == NULL) {
126
142
  s = gpr_strdup("all");
@@ -197,8 +213,8 @@ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
197
213
  g_event_engine->pollset_shutdown(exec_ctx, pollset, closure);
198
214
  }
199
215
 
200
- void grpc_pollset_destroy(grpc_pollset *pollset) {
201
- g_event_engine->pollset_destroy(pollset);
216
+ void grpc_pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
217
+ g_event_engine->pollset_destroy(exec_ctx, pollset);
202
218
  }
203
219
 
204
220
  grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
@@ -260,8 +276,6 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx,
260
276
  g_event_engine->pollset_set_del_fd(exec_ctx, pollset_set, fd);
261
277
  }
262
278
 
263
- grpc_error *grpc_kick_poller(void) { return g_event_engine->kick_poller(); }
264
-
265
279
  #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG
266
280
  grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file,
267
281
  int line, const char *reason) {