{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc/issues/16944","repository_url":"https://api.github.com/repos/grpc/grpc","labels_url":"https://api.github.com/repos/grpc/grpc/issues/16944/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/16944/comments","events_url":"https://api.github.com/repos/grpc/grpc/issues/16944/events","html_url":"https://github.com/grpc/grpc/pull/16944","id":372077429,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MzgwNTAz","number":16944,"title":"Remove memset(0) from arena allocate memory.","user":{"login":"soheilhy","id":394885,"node_id":"MDQ6VXNlcjM5NDg4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/394885?v=4","gravatar_id":"","url":"https://api.github.com/users/soheilhy","html_url":"https://github.com/soheilhy","followers_url":"https://api.github.com/users/soheilhy/followers","following_url":"https://api.github.com/users/soheilhy/following{/other_user}","gists_url":"https://api.github.com/users/soheilhy/gists{/gist_id}","starred_url":"https://api.github.com/users/soheilhy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soheilhy/subscriptions","organizations_url":"https://api.github.com/users/soheilhy/orgs","repos_url":"https://api.github.com/users/soheilhy/repos","events_url":"https://api.github.com/users/soheilhy/events{/privacy}","received_events_url":"https://api.github.com/users/soheilhy/received_events","type":"User","site_admin":false},"labels":[{"id":961832073,"node_id":"MDU6TGFiZWw5NjE4MzIwNzM=","url":"https://api.github.com/repos/grpc/grpc/labels/release%20notes:%20no","name":"release notes: no","color":"0f5f75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":37,"created_at":"2018-10-19T18:57:50Z","updated_at":"2018-10-29T21:48:35Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/16944","html_url":"https://github.com/grpc/grpc/pull/16944","diff_url":"https://github.com/grpc/grpc/pull/16944.diff","patch_url":"https://github.com/grpc/grpc/pull/16944.patch"},"body":"Callers should properly initialize the memory.\r\n\r\nNote that to avoid performance regressions we need some\r\nreordering in the initialization of `grpc_call`.\r\n\r\nI had two more changes in the following files which I will skip in the\r\nPR because they are purely performance changes for cache\r\ncoherency. I will upload that as a separate patch once this PR\r\nis merged:\r\nsrc/core/lib/channel/channel_stack.cc\r\nsrc/core/lib/surface/call.cc\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/grpc/grpc/16944)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/grpc/grpc/issues/comments/434093554","html_url":"https://github.com/grpc/grpc/pull/16944#issuecomment-434093554","issue_url":"https://api.github.com/repos/grpc/grpc/issues/16944","id":434093554,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDA5MzU1NA==","user":{"login":"grpc-testing","id":28024233,"node_id":"MDQ6VXNlcjI4MDI0MjMz","avatar_url":"https://avatars1.githubusercontent.com/u/28024233?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc-testing","html_url":"https://github.com/grpc-testing","followers_url":"https://api.github.com/users/grpc-testing/followers","following_url":"https://api.github.com/users/grpc-testing/following{/other_user}","gists_url":"https://api.github.com/users/grpc-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc-testing/subscriptions","organizations_url":"https://api.github.com/users/grpc-testing/orgs","repos_url":"https://api.github.com/users/grpc-testing/repos","events_url":"https://api.github.com/users/grpc-testing/events{/privacy}","received_events_url":"https://api.github.com/users/grpc-testing/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T21:48:35Z","updated_at":"2018-10-29T21:48:35Z","author_association":"NONE","body":"```\n****************************************************************\n\nlibgrpc.so\n\n     VM SIZE                                                                                            FILE SIZE\n ++++++++++++++ GROWING                                                                              ++++++++++++++\n  +0.2% +1.42Ki [None]                                                                               +45.4Ki  +0.5%\n      +0.2% +1.39Ki [Unmapped]                                                                           +45.4Ki  +0.5%\n      +3.1%     +32 [None]                                                                                     0  [ = ]\n      [NEW]     +32 add_retriable_send_initial_metadata_op((anonymous namespace)::call_data*, (anonymous     +32  [NEW]\n  +4.8% +1.55Ki src/core/ext/transport/chttp2/transport/chttp2_transport.cc                          +1.55Ki  +4.8%\n      [NEW] +3.94Ki grpc_chttp2_transport::grpc_chttp2_transport                                         +3.94Ki  [NEW]\n      [NEW] +1.10Ki grpc_chttp2_stream::grpc_chttp2_stream                                               +1.10Ki  [NEW]\n      [NEW] +1.06Ki grpc_chttp2_stream::~grpc_chttp2_stream                                              +1.06Ki  [NEW]\n      [NEW]    +735 grpc_chttp2_transport::~grpc_chttp2_transport                                           +735  [NEW]\n      [NEW]    +359 try_http_parsing(grpc_chttp2_transport*) [clone .isra.6]                                +359  [NEW]\n      [NEW]    +281 removal_error(grpc_error*, grpc_chttp2_stream*, char const*) [clone .isra.7]            +281  [NEW]\n      [NEW]     +46 post_destructive_reclaimer(grpc_chttp2_transport*) [clone .part.29]                      +46  [NEW]\n      [NEW]     +43 post_benign_reclaimer(grpc_chttp2_transport*) [clone .part.30]                           +43  [NEW]\n      +3.7%     +16 write_action_end_locked                                                                  +16  +3.7%\n      +0.5%     +16 perform_stream_op_locked                                                                 +16  +0.5%\n      +3.2%     +16 write_action_begin_locked                                                                +16  +3.2%\n      +7.5%     +11 grpc_chttp2_initiate_write                                                               +11  +7.5%\n       +16%     +11 write_action                                                                             +11   +16%\n      +7.6%     +11 perform_transport_op                                                                     +11  +7.6%\n       +20%     +11 grpc_core::Chttp2IncomingByteStream::Orphan                                              +11   +20%\n      +6.7%      +8 destroy_stream                                                                            +8  +6.7%\n      +9.4%      +8 destroy_transport                                                                         +8  +9.4%\n      +2.4%      +8 perform_stream_op                                                                         +8  +2.4%\n      +7.9%      +8 grpc_core::Chttp2IncomingByteStream::Next                                                 +8  +7.9%\n      +0.1%      +1 [Unmapped]                                                                                +1  +0.1%\n  +2.5%    +960 src/core/ext/filters/client_channel/client_channel.cc                                   +960  +2.5%\n      [NEW] +2.12Ki run_closures_for_completed_call                                                      +2.12Ki  [NEW]\n      [NEW] +1.45Ki maybe_retry                                                                          +1.45Ki  [NEW]\n      [NEW]    +397 add_closure_for_subchannel_batch(grpc_call_element*, grpc_transport_stream_op_batch*    +397  [NEW]\n      [NEW]    +352 add_retriable_send_initial_metadata_op                                                  +352  [NEW]\n      +107%    +287 cc_init_call_elem                                                                       +287  +107%\n      [NEW]    +256 retry_commit                                                                            +256  [NEW]\n       +45%    +253 cc_destroy_call_elem                                                                    +253   +45%\n      [NEW]    +250 maybe_clear_pending_batch(grpc_call_element*, (anonymous namespace)::pending_batch*)    +250  [NEW]\n      [NEW]    +192 add_retriable_send_message_op(grpc_call_element*, (anonymous namespace)::subchannel_    +192  [NEW]\n      [NEW]    +189 batch_data_unref                                                                        +189  [NEW]\n      +2.9%    +147 [Other]                                                                                 +147  +2.9%\n      [NEW]    +110 free_cached_send_message                                                                +110  [NEW]\n      [NEW]     +67 free_cached_send_initial_metadata                                                        +67  [NEW]\n      [NEW]     +67 free_cached_send_trailing_metadata                                                       +67  [NEW]\n      +1.0%     +48 on_resolver_result_changed_locked                                                        +48  +1.0%\n      +1.3%     +48 start_retriable_subchannel_batches                                                       +48  +1.3%\n      +2.4%     +32 cc_init_channel_elem                                                                     +32  +2.4%\n      +6.1%     +32 cc_destroy_channel_elem                                                                  +32  +6.1%\n      +2.0%     +32 start_transport_op_locked                                                                +32  +2.0%\n      +2.7%     +32 process_service_config_and_start_lb_pick_locked                                          +32  +2.7%\n       +15%     +25 batch_data_create                                                                        +25   +15%\n  +5.7%    +912 src/core/lib/surface/call.cc                                                            +912  +5.7%\n       +37%    +720 grpc_call_create                                                                        +720   +37%\n      [NEW]    +476 set_encodings_accepted_by_peer(grpc_call*, grpc_mdelem, unsigned int*, bool) [clone     +476  [NEW]\n      [NEW]    +259 publish_app_metadata(grpc_call*, grpc_metadata_batch*, int) [clone .isra.3]             +259  [NEW]\n      +4.2%    +144 call_start_batch                                                                        +144  +4.2%\n      [NEW]     +47 get_md_elem(grpc_metadata*, grpc_metadata*, int, int) [clone .part.2]                    +47  [NEW]\n      +9.1%     +16 grpc_call_set_completion_queue                                                           +16  +9.1%\n       +23%     +16 release_call                                                                             +16   +23%\n      +7.2%     +16 cancel_with_error                                                                        +16  +7.2%\n      +3.3%     +16 receiving_stream_ready                                                                   +16  +3.3%\n      +1.0%     +16 receiving_initial_metadata_ready                                                         +16  +1.0%\n      +2.3%      +8 destroy_call                                                                              +8  +2.3%\n  +0.7%    +807 [Other]                                                                                 +807  +0.7%\n  +3.5%    +514 src/core/ext/transport/inproc/inproc_transport.cc                                       +514  +3.5%\n      [NEW] +1.23Ki inproc_stream::inproc_stream                                                         +1.23Ki  [NEW]\n      +396%    +376 destroy_transport                                                                       +376  +396%\n      [NEW]    +313 fill_in_metadata                                                                        +313  [NEW]\n      [NEW]    +257 close_stream_locked(inproc_stream*) [clone .part.9]                                     +257  [NEW]\n      [NEW]    +123 close_other_side_locked(inproc_stream*, char const*) [clone .part.8]                    +123  [NEW]\n       +28%     +96 destroy_stream                                                                           +96   +28%\n      [NEW]     +96 maybe_schedule_op_closure_locked(inproc_stream*, grpc_error*) [clone .part.2]            +96  [NEW]\n      +8.3%     +55 grpc_inproc_channel_create                                                               +55  +8.3%\n  +6.7%    +512 src/core/ext/filters/client_channel/health/health_check_client.cc                       +512  +6.7%\n      +152%    +384 grpc_core::HealthCheckClient::CallState::CallState                                      +384  +152%\n      +3.7%     +56 grpc_core::HealthCheckClient::CallState::StartCall                                       +56  +3.7%\n       +11%     +21 [Unmapped]                                                                               +21   +11%\n       +12%     +16 grpc_core::HealthCheckClient::CallState::RecvMessageReady                                +16   +12%\n      +1.3%     +16 grpc_core::HealthCheckClient::CallState::DoneReadingRecvMessage                          +16  +1.3%\n      +2.9%     +11 grpc_core::HealthCheckClient::HealthCheckClient                                          +11  +2.9%\n       +13%      +8 grpc_core::HealthCheckClient::CallState::StartBatch                                       +8   +13%\n      +7.4%      +8 grpc_core::HealthCheckClient::CallState::StartCancel                                      +8  +7.4%\n      +7.0%      +8 grpc_core::HealthCheckClient::CallState::Cancel                                           +8  +7.0%\n  +4.0%    +208 src/core/ext/filters/http/client/http_client_filter.cc                                  +208  +4.0%\n      +156%    +212 init_call_elem                                                                          +212  +156%\n  +5.2%    +168 src/core/lib/security/transport/client_auth_filter.cc                                   +168  +5.2%\n       +98%    +132 init_call_elem                                                                          +132   +98%\n      +4.0%     +24 auth_start_transport_stream_op_batch                                                     +24  +4.0%\n      +2.0%     +16 on_host_checked                                                                          +16  +2.0%\n  +1.0%    +160 src/core/lib/surface/server.cc                                                          +160  +1.0%\n      +9.6%     +32 [Unmapped]                                                                               +32  +9.6%\n       +11%     +22 init_call_elem                                                                           +22   +11%\n      +6.6%     +19 finish_start_new_rpc                                                                     +19  +6.6%\n      +5.1%     +17 accept_stream                                                                            +17  +5.1%\n      +2.7%     +16 publish_new_rpc                                                                          +16  +2.7%\n      +1.7%     +16 grpc_server_shutdown_and_notify                                                          +16  +1.7%\n      +2.3%     +11 queue_call_request                                                                       +11  +2.3%\n      +8.1%     +11 request_matcher_zombify_all_pending_calls((anonymous namespace)::request_matcher*) [     +11  +8.1%\n      +3.9%      +8 init_channel_elem                                                                         +8  +3.9%\n      +1.4%      +8 grpc_server_start                                                                         +8  +1.4%\n  +3.9%    +130 src/core/ext/filters/http/message_compress/message_compress_filter.cc                   +130  +3.9%\n       +95%    +138 init_call_elem                                                                          +138   +95%\n  +0.8%    +128 src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc                          +128  +0.8%\n      +3.2%     +33 grpc_core::(anonymous namespace)::GrpcLbFactory::CreateLoadBalancingPolicy(grpc_core     +33  +3.2%\n      +2.0%     +32 grpc_core::(anonymous namespace)::GrpcLb::StartBalancerCallLocked                        +32  +2.0%\n      +0.8%     +16 grpc_core::(anonymous namespace)::GrpcLb::CreateOrUpdateRoundRobinPolicyLocked() [cl     +16  +0.8%\n      +4.3%     +16 grpc_core::(anonymous namespace)::GrpcLb::~GrpcLb                                        +16  +4.3%\n      +9.2%     +11 grpc_core::(anonymous namespace)::GrpcLb::BalancerCallState::ScheduleNextClientLoadR     +11  +9.2%\n      +6.1%     +11 grpc_core::(anonymous namespace)::GrpcLb::StartPickingLocked                             +11  +6.1%\n      +2.6%      +8 grpc_core::(anonymous namespace)::GrpcLb::PickLocked                                      +8  +2.6%\n      +1.4%      +8 grpc_core::(anonymous namespace)::GrpcLb::BalancerCallState::SendClientLoadReportLoc      +8  +1.4%\n  +0.8%    +128 src/core/ext/filters/client_channel/lb_policy/xds/xds.cc                                +128  +0.8%\n      +3.2%     +33 grpc_core::(anonymous namespace)::XdsFactory::CreateLoadBalancingPolicy(grpc_core::L     +33  +3.2%\n      +2.0%     +32 grpc_core::(anonymous namespace)::XdsLb::StartBalancerCallLocked                         +32  +2.0%\n      +0.9%     +16 grpc_core::(anonymous namespace)::XdsLb::CreateOrUpdateRoundRobinPolicyLocked() [clo     +16  +0.9%\n      +4.3%     +16 grpc_core::(anonymous namespace)::XdsLb::~XdsLb                                          +16  +4.3%\n      +9.2%     +11 grpc_core::(anonymous namespace)::XdsLb::BalancerCallState::ScheduleNextClientLoadRe     +11  +9.2%\n      +6.1%     +11 grpc_core::(anonymous namespace)::XdsLb::StartPickingLocked                              +11  +6.1%\n      +2.6%      +8 grpc_core::(anonymous namespace)::XdsLb::PickLocked                                       +8  +2.6%\n      +1.4%      +8 grpc_core::(anonymous namespace)::XdsLb::BalancerCallState::SendClientLoadReportLock      +8  +1.4%\n  +2.8%    +128 src/core/ext/filters/http/server/http_server_filter.cc                                  +128  +2.8%\n      [NEW] +2.52Ki hs_filter_incoming_metadata(grpc_call_element*, grpc_metadata_batch*) [clone .isra.6 +2.52Ki  [NEW]\n      +115%    +124 hs_init_call_elem                                                                       +124  +115%\n      +4.5%      +4 [Unmapped]                                                                                +4  +4.5%\n  +5.2%    +112 src/core/ext/filters/deadline/deadline_filter.cc                                        +112  +5.2%\n      [NEW]    +261 start_timer_if_needed(grpc_call_element*, long) [clone .part.3]                         +261  [NEW]\n      [NEW]    +146 grpc_deadline_state::grpc_deadline_state                                                +146  [NEW]\n      [NEW]     +32 grpc_deadline_state::destroy                                                             +32  [NEW]\n       +89%     +24 init_call_elem                                                                           +24   +89%\n      +6.5%     +16 server_start_transport_stream_op_batch                                                   +16  +6.5%\n      +7.7%      +8 grpc_deadline_state_client_start_transport_stream_op_batch                                +8  +7.7%\n      +3.0%      +8 timer_callback                                                                            +8  +3.0%\n      +6.7%      +8 send_cancel_op_in_call_combiner                                                           +8  +6.7%\n       +80%      +4 destroy_call_elem                                                                         +4   +80%\n      +1.3%      +2 [Unmapped]                                                                                +2  +1.3%\n      +1.4%      +2 start_timer_after_init                                                                    +2  +1.4%\n  +3.5%    +112 src/core/lib/security/context/security_context.cc                                       +112  +3.5%\n      [NEW]     +50 grpc_client_security_context::~grpc_client_security_context                              +50  [NEW]\n      +450%     +45 grpc_client_security_context_create                                                      +45  +450%\n      [NEW]     +42 grpc_server_security_context::~grpc_server_security_context                              +42  [NEW]\n      +370%     +37 grpc_server_security_context_create                                                      +37  +370%\n       +16%     +27 [Unmapped]                                                                               +27   +16%\n  +1.2%     +96 src/core/lib/iomgr/resource_quota.cc                                                     +96  +1.2%\n      +9.7%     +48 grpc_resource_user_create                                                                +48  +9.7%\n       +11%     +32 grpc_resource_quota_create                                                               +32   +11%\n       +35%     +16 grpc_resource_user_slice_allocator_init                                                  +16   +35%\n      +7.1%      +8 grpc_resource_user_shutdown                                                               +8  +7.1%\n      +2.5%      +8 grpc_resource_quota_resize                                                                +8  +2.5%\n  +0.9%     +88 src/core/ext/filters/client_channel/subchannel.cc                                        +88  +0.9%\n      +8.1%     +24 grpc_core::ConnectedSubchannel::CreateCall                                               +24  +8.1%\n      +0.9%     +16 grpc_subchannel_create                                                                   +16  +0.9%\n      +1.0%     +16 on_subchannel_connected                                                                  +16  +1.0%\n      +4.1%     +16 maybe_start_connecting_locked                                                            +16  +4.1%\n      +8.0%      +8 grpc_subchannel_weak_unref                                                                +8  +8.0%\n      +3.7%      +8 grpc_subchannel_call_process_op                                                           +8  +3.7%\n  +2.8%     +80 src/core/ext/filters/max_age/max_age_filter.cc                                           +80  +2.8%\n      +8.9%     +72 init_channel_elem                                                                        +72  +8.9%\n      +5.9%      +8 [Unmapped]                                                                                +8  +5.9%\n  +1.3%     +80 src/core/lib/iomgr/udp_server.cc                                                         +80  +1.3%\n       +10%     +25 GrpcUdpListener::StartListening                                                          +25   +10%\n       +11%     +22 GrpcUdpListener::OnFdAboutToOrphan                                                       +22   +11%\n      +7.5%     +16 GrpcUdpListener::OnRead                                                                  +16  +7.5%\n      +7.9%     +16 GrpcUdpListener::do_write                                                                +16  +7.9%\n      +9.5%     +11 GrpcUdpListener::OrphanFd                                                                +11  +9.5%\n      +4.5%      +8 GrpcUdpListener::OnCanWrite                                                               +8  +4.5%\n  +0.9%     +64 src/core/lib/iomgr/tcp_posix.cc                                                          +64  +0.9%\n      +1.8%     +16 grpc_tcp_create                                                                          +16  +1.8%\n      +3.5%     +16 run_poller                                                                               +16  +3.5%\n      +3.2%     +16 notify_on_write                                                                          +16  +3.2%\n       +10%     +11 notify_on_read                                                                           +11   +10%\n      +2.8%      +5 [Unmapped]                                                                                +5  +2.8%\n\n -------------- SHRINKING                                                                            --------------\n -17.7%     -64 src/core/ext/transport/chttp2/transport/incoming_metadata.cc                             -64 -17.7%\n      [DEL]     -35 grpc_chttp2_incoming_metadata_buffer_init                                                -35  [DEL]\n     -48.8%     -20 [Unmapped]                                                                               -20 -48.8%\n      [DEL]      -9 grpc_chttp2_incoming_metadata_buffer_destroy                                              -9  [DEL]\n  -1.4%     -52 src/core/lib/security/transport/secure_endpoint.cc                                       -52  -1.4%\n      [DEL]    -256 call_read_cb                                                                            -256  [DEL]\n      [DEL]    -221 flush_write_staging_buffer                                                              -221  [DEL]\n      [DEL]    -151 destroy                                                                                 -151  [DEL]\n     -87.8%     -36 endpoint_destroy                                                                         -36 -87.8%\n      -5.2%     -20 grpc_secure_endpoint_create                                                              -20  -5.2%\n  -1.0%     -32 src/core/ext/transport/chttp2/transport/frame_data.cc                                    -32  -1.0%\n      [DEL]    -191 grpc_chttp2_data_parser_destroy                                                         -191  [DEL]\n      [DEL]     -17 grpc_chttp2_data_parser_init                                                             -17  [DEL]\n     -44.1%     -15 [Unmapped]                                                                               -15 -44.1%\n  -7.8%     -22 src/core/lib/gpr/arena.cc                                                                -22  -7.8%\n     -17.9%     -22 gpr_arena_alloc                                                                          -22 -17.9%\n     -35.0%      -7 [Unmapped]                                                                                -7 -35.0%\n      -4.5%      -3 gpr_arena_destroy                                                                         -3  -4.5%\n\n  +0.5% +8.06Ki TOTAL                                                                                +52.0Ki  +0.5%\n\n\n****************************************************************\n\nlibgrpc++.so\n\n     VM SIZE              FILE SIZE\n ++++++++++++++ GROWIN ++++++++++++++\n  [ = ]       0 [None]     +40  +0.0%\n\n  [ = ]       0 TOTAL      +40  +0.0%\n\n\n\n```"}}
{"actor":{"display_login":"grpc-testing"}}