Commit Graph

3177 Commits

Author SHA1 Message Date
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
Vijay Pai 50576179f8
Merge pull request #17978 from yashykt/interceptorcleanup1
Global Interceptor Registration allowed only once
2019-03-20 19:13:55 -07:00
Vijay Pai 7b3a120295 Address reviewer comments 2019-03-18 16:51:15 -07:00
Vijay Pai 93f0a3f653 Address reviewer comments 2019-03-18 15:37:35 -07:00
Vijay Pai 04a6b8467c Support callback on cancellation of server-side unary RPCs 2019-03-18 12:00:57 -07:00
Vijay Pai 8c3d4a7dfd
Merge pull request #18072 from vjpai/client_streaming_hold
C++ callback API: Add support for client-side extra-reaction operations via Holds
2019-03-16 10:27:36 -07:00
Vijay Pai 797b01a85e
Merge pull request #17760 from Norman0406/fix-interceptor_memory_leak
Fixing memory leak in interceptor by removing unsued send_status_
2019-03-16 10:14:19 -07:00
Vijay Pai 48ce4ca939 Add support for extra-reaction operations via Holds 2019-03-15 16:17:01 -07:00
Karthik Ravi Shankar 3b4835d92d
Merge pull request #18392 from grpc/revert-18223-grpc_namespace_opencensus
Revert "Fold opencensus into grpc_impl namespace"
2019-03-15 11:27:35 -07:00
Karthik Ravi Shankar 2bf934f97d
Revert "Fold opencensus into grpc_impl namespace" 2019-03-15 10:20:06 -07:00
Yihua Zhang b017c801b6 Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
Norman Link 3d28761029 Fixing memory leak in interceptor by removing unsued send_status_ 2019-03-13 21:42:02 +01:00
Vijay Pai 85f8e0f4b0
Merge pull request #18289 from vjpai/unimplemented_rpc
C++ callback API: properly handle and test unimplemented RPC method
2019-03-13 12:47:36 -07:00
Muxi Yan 33ebf719a5 use cached grpc ssl credential 2019-03-12 13:11:10 -07:00
Karthik Ravi Shankar 276c4dc593
Merge pull request #18223 from grpc/grpc_namespace_opencensus
Fold opencensus into grpc_impl namespace
2019-03-08 15:45:03 -08:00
Vijay Pai b7f14fdab8 Properly implement unimplemented RPCs at callback-only server 2019-03-06 23:43:34 -08:00
Vijay Pai 96f8b7a532
Merge pull request #18239 from vjpai/callback_async_generic_service
C++: Support callback-based generic service
2019-03-06 19:35:26 -08:00
Juanli Shen e889fda482 Use real resolver in xds lb channel 2019-03-05 13:29:55 -08:00
Soheil Hassas Yeganeh c060d55cc7
Revert "Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing." 2019-03-05 14:01:01 -05:00
Karthik Ravi Shankar b606cad6cc Fold opencensus into grpc_impl namespace
Moving opencensus into grpc_impl namespace..
2019-03-04 15:47:37 -08:00
Vijay Pai 05d8ddfc6e Support callback-based generic service 2019-03-04 13:13:12 -08:00
Soheil Hassas Yeganeh 509e77a5a3 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()
2019-03-04 14:17:46 -05:00
Lidi Zheng a846006192
Merge pull request #18224 from lidizheng/grpc-h-cancel
Correct grpc_call_cancel and grpc_call_cancel_with_status comments
2019-03-04 10:34:14 -08:00
Lidi Zheng e1f5ce30ea Correct grpc_call_cancel and grpc_call_cancel_with_status comments 2019-03-01 16:40:00 -08:00
Yang Gao 40241c5236
Merge pull request #18157 from yang-g/rollbackrollback
Roll-forward PR17308
2019-02-27 17:04:19 -08:00
Vijay Pai 2eb25c871e Avoid build errors 2019-02-26 03:08:06 -08:00
yang-g 456f748b2f Revert "Merge pull request #18146 from grpc/revert-17308-shutdown"
This reverts commit 9079e98dfc, reversing
changes made to 76a38bfcc2.
2019-02-25 10:11:06 -08:00
Vijay Pai 857e622e6f
Merge pull request #18098 from vjpai/try_2
Reduce starting callback counter to exclude client-side StartCall
2019-02-22 19:52:29 -08:00
Yang Gao 4bc2ca4de6
Revert "Move grpc_shutdown internals to a detached thread" 2019-02-22 16:34:24 -08:00
Vijay Pai 147c61b2a4 Exclude StartCall from starting callback counter value 2019-02-20 21:13:44 -08:00
Yuwei Huang 3cbf4f50ea Remove extra semicolons after function definitions
We are planning to enable -Wextra-semi flag in our project but some
header files in gRPC have extra semicolons that violates the check and
blocks us from enabling the flag.

This change removes unnecessary semicolons in the code. Note that having
semicolon after the GRPC_ABSTRACT macro technically also violates the
check, but it's fine for us since they are not used in public headers,
and it will be confusing to have lines ending only with GRPC_ABSTRACT,
so I keep them as-is.
2019-02-20 17:58:30 -08:00
yang-g 0df63d3c98 Merge branch 'master' into shutdown 2019-02-15 21:51:03 -08:00
Soheil Hassas Yeganeh db38d4ca9b
Merge pull request #17939 from vertextao/gpr_mu_cv-leak-test
Add ASAN-only leak detection for gpr_mu/cv and fix the newly caught leaks
2019-02-15 21:43:32 -05:00
yang-g 86b23adc7f Other comments 2019-02-15 16:26:31 -08:00
Nicolas Noble 2ad245cb0c
Revert "Folding the Channel class into the grpc_impl namespace." 2019-02-15 09:52:15 -08:00
xtao 7cbb42bb9e
define GPR_ATTRIBUTE_NO_TSAN by using GPR_HAS_FEATURE. 2019-02-16 00:00:50 +08:00
xtao c03496fdac
1) remove unnecessary initialization;
2) correct comment grammar issue;
3) fix the newly caught leaks;
2019-02-16 00:00:50 +08:00
xtao fb3b85a81a
1) Add MACRO GPR_HAS_FEATURE; 2) Add test code within GRPC_ASAN_ENABLED for gpr_mu/cv mem-leak detection. 2019-02-16 00:00:49 +08:00
yang-g 545c555d31 Rename new public API 2019-02-14 14:22:40 -08:00
apolcyn 223eb9960e
Merge pull request #18046 from apolcyn/disable_ares_android
Disable c-ares on Android
2019-02-13 16:59:08 -08:00
Alexander Polcyn 3ebbce2f59 Disable c-ares on Android 2019-02-13 13:30:03 -08:00
Yash Tibrewal 73353ad281 Merge branch 'master' into interceptorcleanup1 2019-02-13 12:47:47 -08:00
Yash Tibrewal 50497c2317 Reviewer comments 2019-02-13 12:46:07 -08:00
yang-g 684643ff0a Test fixing php 2019-02-13 11:02:48 -08:00
Nicolas "Pixel" Noble 3e30c38f1c Adressing comments. 2019-02-13 00:20:50 +01:00
Nicolas "Pixel" Noble 63db582516 Merge branch 'master' of https://github.com/grpc/grpc into channel 2019-02-13 00:19:23 +01:00
yang-g bc946d6c6d merge with head and resolve conflicts 2019-02-12 15:00:32 -08:00
Yash Tibrewal c71b2f4fb7 Global Interceptor Registration allowed only once 2019-02-07 19:36:51 -08:00
Yash Tibrewal 89ee1a8b10 Improved interception docs 2019-02-07 19:18:40 -08:00
Vijay Pai cfc52beebc
Merge pull request #17933 from vjpai/resettable_alarm
Allow a grpc::Alarm to be set again after firing
2019-02-06 09:53:48 -08:00