Commit Graph

521 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
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
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
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
Yang Gao 4bc2ca4de6
Revert "Move grpc_shutdown internals to a detached thread" 2019-02-22 16:34:24 -08:00
yang-g 545c555d31 Rename new public API 2019-02-14 14:22:40 -08:00
yang-g 233406d450 generate projects 2019-02-13 11:29:40 -08:00
yang-g bc946d6c6d merge with head and resolve conflicts 2019-02-12 15:00:32 -08:00
Yihua Zhang a3d997cbdc Add a TLS credential surface API (experimental) 2019-01-29 10:04:28 -08:00
Vijay Pai fab05d336c Dynamic callback requesting, graceful server shutdown, and separate ExecCtx for callbacks 2019-01-23 11:21:50 -08:00
yang-g df9bd2f506 Merge remote-tracking branch 'upstream/master' into shutdown 2019-01-14 13:19:01 -08:00
Alexander Polcyn 0ec9372074 Multiple test timeout 5x 2019-01-08 14:46:38 -08:00
yang-g 3c8d24ba2c merge with head and resolve conflict 2018-12-19 10:13:41 -08:00
yang-g 038a71d826 Merge remote-tracking branch 'upstream/master' into gpr_test_util_to_grpc_test_util 2018-12-17 08:52:20 -08:00
Soheil Hassas Yeganeh 9decf48632 Move security credentials, connectors, and auth context to C++
This is to use `grpc_core::RefCount` to improve performnace.
This commit also replaces explicit C vtables, with C++ vtable
with its own compile time assertions and performance benefits.
It also makes use of `RefCountedPtr` wherever possible.
2018-12-13 10:38:12 -05:00
yang-g 67742ef63f Fix BUILD files. Manually edit bzl files 2018-12-06 14:37:52 -08:00
yang-g 991963efcc Merge branch 'master' into shutdown 2018-12-05 14:53:06 -08:00
yang-g e75fc243da change tests to use the new class instead of grpc_test_init 2018-11-30 08:57:38 -08:00
yang-g cdd698810b Move grpc_shutdown internals to a detached thread 2018-11-27 14:26:08 -08:00
ncteisen 693f46841a Add GetServer to core 2018-10-24 17:31:30 -07:00
ncteisen 3545d754d5 Channelz get server sockets support 2018-10-02 09:55:00 -07:00
ncteisen 4fcf871806 Merge branch 'master' of https://github.com/grpc/grpc into channelz 2018-09-25 13:37:58 -07:00
Vijay Pai 9e6511ae2e Make the core callback interface API so that it can be used in generated code 2018-09-19 23:57:56 -07:00
ncteisen 0a650eae58 regenerate projects 2018-09-19 07:41:59 -07:00
ncteisen 6076b1d798 Merge branch 'channelz-subchannels' into channelz-server 2018-08-28 12:55:40 -07:00
ncteisen 4b5b019d56 Merge branch 'master' of https://github.com/grpc/grpc into channelz-subchannels 2018-08-28 12:53:57 -07:00
Eric Gribkoff b59d8674d2 Python post-fork handler: exit if grpc shutdown fails 2018-08-22 13:07:22 -07:00
ncteisen 632b58cb82 regenerate projects 2018-08-15 11:13:41 -07:00
Vijay Pai 4b42288905
Merge pull request #16302 from vjpai/callback_cq
EXPERIMENTAL: Infrastructure for callback-based core CQ
2018-08-14 09:37:58 -07:00
Vijay Pai a59e48e889 Add a test of callback CQ 2018-08-14 02:18:32 -07:00
ncteisen c850354423 Merge branch 'master' of https://github.com/grpc/grpc into channelz-subchannels 2018-08-11 21:19:14 -04:00
Vijay Pai e84096bbe5 Experimental infrastructure for callback-based CQ 2018-08-10 14:33:22 -07:00
Sree Kuchibhotla f63b51be86 Merge branch 'master' into rq-threads-2 2018-08-09 12:13:41 -07:00
Mark D. Roth f7e72560b6 Add experimental API for resetting connection backoff. 2018-08-06 14:46:53 -07:00
Sree Kuchibhotla bdd13cb0ae
Revert "Revert "Restrict the number of threads in C++ sync server"" 2018-08-01 11:22:40 -07:00
Nicolas Noble bea98c3c1b
Revert "Restrict the number of threads in C++ sync server" 2018-07-31 21:12:45 -07:00
ncteisen 864e68e96d Fix channel trace polymorphism 2018-07-27 02:27:58 -07:00
Sree Kuchibhotla 9bc8ee42c2 generate_projects.sh 2018-07-25 10:58:33 -07:00
ncteisen b86a744751 Expose GetChannel and GetTopChannels Core API 2018-07-18 15:03:31 -07:00
yihuaz 252d3f3b46
Merge pull request #15909 from yihuazhang/local_channel_credentials
Implement local channel/server credentials
2018-07-06 05:44:09 -07:00
Yihua Zhang c5f1eda10f implement loca credentials 2018-07-02 13:29:27 -07:00
ncteisen 8db7788d46 Merge branch 'master' of https://github.com/grpc/grpc into serialization 2018-06-28 00:12:02 -07:00
Juanli Shen 174166d20c Add header back in build.yaml 2018-06-25 16:27:32 -07:00
Juanli Shen f5f1d57d7a Add load reporting filter 2018-06-22 10:00:48 -07:00
ncteisen 93a90e6132 Support codegen generic on server side 2018-06-20 07:59:05 -07:00
ncteisen 68d4f50f77 Merge branch 'master' of https://github.com/grpc/grpc into channelz 2018-06-19 14:00:52 -07:00
Ian Haken 68eff58df6 Create verify_peer_options when creating ssl credentials in order to expose a verification callback option.
These options are not yet exposed to languages outside of core.
2018-06-12 12:59:37 -07:00
ncteisen 16280c7398 Remove unused API 2018-06-08 09:44:25 -07:00
Noah Eisen 70f7558a18 re generate project 2018-06-07 13:03:32 -07:00
ncteisen ec482847b2 re run generate projects 2018-06-05 16:59:25 -07:00