Merge branch 'infinite_stream' into epex4

pull/10712/head
Craig Tiller 8 years ago
commit e576b6c5e2
  1. 4
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  2. 10
      src/core/ext/transport/chttp2/transport/frame_data.c
  3. 10
      src/core/ext/transport/chttp2/transport/frame_data.h
  4. 8
      src/objective-c/BoringSSL.podspec
  5. 2
      test/cpp/qps/client_sync.cc
  6. 91
      tools/profiling/microbenchmarks/bm_diff.py

@ -1679,7 +1679,7 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx,
grpc_slice_buffer_swap(&s->unprocessed_incoming_frames_buffer, grpc_slice_buffer_swap(&s->unprocessed_incoming_frames_buffer,
&s->frame_storage); &s->frame_storage);
} }
error = deframe_unprocessed_incoming_frames( error = grpc_deframe_unprocessed_incoming_frames(
exec_ctx, &s->data_parser, s, exec_ctx, &s->data_parser, s,
&s->unprocessed_incoming_frames_buffer, NULL, s->recv_message); &s->unprocessed_incoming_frames_buffer, NULL, s->recv_message);
if (error != GRPC_ERROR_NONE) { if (error != GRPC_ERROR_NONE) {
@ -2627,7 +2627,7 @@ static grpc_error *incoming_byte_stream_pull(grpc_exec_ctx *exec_ctx,
grpc_chttp2_stream *s = bs->stream; grpc_chttp2_stream *s = bs->stream;
if (s->unprocessed_incoming_frames_buffer.length > 0) { if (s->unprocessed_incoming_frames_buffer.length > 0) {
grpc_error *error = deframe_unprocessed_incoming_frames( grpc_error *error = grpc_deframe_unprocessed_incoming_frames(
exec_ctx, &s->data_parser, s, &s->unprocessed_incoming_frames_buffer, exec_ctx, &s->data_parser, s, &s->unprocessed_incoming_frames_buffer,
slice, NULL); slice, NULL);
if (error != GRPC_ERROR_NONE) { if (error != GRPC_ERROR_NONE) {

@ -112,12 +112,10 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf,
stats->data_bytes += write_bytes; stats->data_bytes += write_bytes;
} }
grpc_error *deframe_unprocessed_incoming_frames(grpc_exec_ctx *exec_ctx, grpc_error *grpc_deframe_unprocessed_incoming_frames(
grpc_chttp2_data_parser *p, grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *p, grpc_chttp2_stream *s,
grpc_chttp2_stream *s, grpc_slice_buffer *slices, grpc_slice *slice_out,
grpc_slice_buffer *slices, grpc_byte_stream **stream_out) {
grpc_slice *slice_out,
grpc_byte_stream **stream_out) {
grpc_error *error = GRPC_ERROR_NONE; grpc_error *error = GRPC_ERROR_NONE;
grpc_chttp2_transport *t = s->t; grpc_chttp2_transport *t = s->t;

@ -90,11 +90,9 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf,
grpc_transport_one_way_stats *stats, grpc_transport_one_way_stats *stats,
grpc_slice_buffer *outbuf); grpc_slice_buffer *outbuf);
grpc_error *deframe_unprocessed_incoming_frames(grpc_exec_ctx *exec_ctx, grpc_error *grpc_deframe_unprocessed_incoming_frames(
grpc_chttp2_data_parser *p, grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *p, grpc_chttp2_stream *s,
grpc_chttp2_stream *s, grpc_slice_buffer *slices, grpc_slice *slice_out,
grpc_slice_buffer *slices, grpc_byte_stream **stream_out);
grpc_slice *slice_out,
grpc_byte_stream **stream_out);
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */ #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */

@ -31,7 +31,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'BoringSSL' s.name = 'BoringSSL'
version = '8.1' version = '8.2'
s.version = version s.version = version
s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.'
# Adapted from the homepage: # Adapted from the homepage:
@ -113,7 +113,6 @@ Pod::Spec.new do |s|
s.subspec 'Interface' do |ss| s.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'include/openssl' ss.header_mappings_dir = 'include/openssl'
ss.source_files = 'include/openssl/*.h' ss.source_files = 'include/openssl/*.h'
ss.exclude_files = 'include/openssl/arm_arch.h'
end end
s.subspec 'Implementation' do |ss| s.subspec 'Implementation' do |ss|
ss.header_mappings_dir = '.' ss.header_mappings_dir = '.'
@ -150,6 +149,11 @@ Pod::Spec.new do |s|
#include "ssl.h" #include "ssl.h"
#include "crypto.h" #include "crypto.h"
#include "aes.h" #include "aes.h"
/* The following macros are defined by base.h. The latter is the first file included by the
other headers. */
#if defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
# include "arm_arch.h"
#endif
#include "asn1.h" #include "asn1.h"
#include "asn1_mac.h" #include "asn1_mac.h"
#include "asn1t.h" #include "asn1t.h"

@ -167,7 +167,7 @@ class SynchronousStreamingClient final : public SynchronousClient {
} }
}); });
} }
for (size_t i=0; i<num_threads_; i++) { for (size_t i = 0; i < num_threads_; i++) {
cleanup_threads[i].join(); cleanup_threads[i].join();
} }
} }

@ -192,52 +192,59 @@ class Benchmark:
return [self.final[f] if f in self.final else '' for f in flds] return [self.final[f] if f in self.final else '' for f in flds]
def read_file(filename): def eintr_be_gone(fn):
"""Run fn until it doesn't stop because of EINTR"""
while True: while True:
try: try:
with open(filename) as f: return fn()
return f.read()
except IOError, e: except IOError, e:
if e.errno != errno.EINTR: if e.errno != errno.EINTR:
raise raise
def read_json(filename): def read_json(filename):
return json.loads(read_file(filename)) with open(filename) as f: return json.loads(f.read())
benchmarks = collections.defaultdict(Benchmark)
def finalize():
for bm in args.benchmarks: benchmarks = collections.defaultdict(Benchmark)
for loop in range(0, args.loops):
js_new_ctr = read_json('%s.counters.new.%d.json' % (bm, loop)) for bm in args.benchmarks:
js_new_opt = read_json('%s.opt.new.%d.json' % (bm, loop)) for loop in range(0, args.loops):
js_old_ctr = read_json('%s.counters.old.%d.json' % (bm, loop)) js_new_ctr = read_json('%s.counters.new.%d.json' % (bm, loop))
js_old_opt = read_json('%s.opt.old.%d.json' % (bm, loop)) js_new_opt = read_json('%s.opt.new.%d.json' % (bm, loop))
js_old_ctr = read_json('%s.counters.old.%d.json' % (bm, loop))
for row in bm_json.expand_json(js_new_ctr, js_new_opt): js_old_opt = read_json('%s.opt.old.%d.json' % (bm, loop))
print row
name = row['cpp_name'] for row in bm_json.expand_json(js_new_ctr, js_new_opt):
if name.endswith('_mean') or name.endswith('_stddev'): continue print row
benchmarks[name].add_sample(row, True) name = row['cpp_name']
for row in bm_json.expand_json(js_old_ctr, js_old_opt): if name.endswith('_mean') or name.endswith('_stddev'): continue
print row benchmarks[name].add_sample(row, True)
name = row['cpp_name'] for row in bm_json.expand_json(js_old_ctr, js_old_opt):
if name.endswith('_mean') or name.endswith('_stddev'): continue print row
benchmarks[name].add_sample(row, False) name = row['cpp_name']
if name.endswith('_mean') or name.endswith('_stddev'): continue
really_interesting = set() benchmarks[name].add_sample(row, False)
for name, bm in benchmarks.items():
print name really_interesting = set()
really_interesting.update(bm.process()) for name, bm in benchmarks.items():
fields = [f for f in args.track if f in really_interesting] print name
really_interesting.update(bm.process())
headers = ['Benchmark'] + fields fields = [f for f in args.track if f in really_interesting]
rows = []
for name in sorted(benchmarks.keys()): headers = ['Benchmark'] + fields
if benchmarks[name].skip(): continue rows = []
rows.append([name] + benchmarks[name].row(fields)) for name in sorted(benchmarks.keys()):
if rows: if benchmarks[name].skip(): continue
text = 'Performance differences noted:\n' + tabulate.tabulate(rows, headers=headers, floatfmt='+.2f') rows.append([name] + benchmarks[name].row(fields))
else: if rows:
text = 'No significant performance differences' text = 'Performance differences noted:\n' + tabulate.tabulate(rows, headers=headers, floatfmt='+.2f')
comment_on_pr.comment_on_pr('```\n%s\n```' % text) else:
print text text = 'No significant performance differences'
comment_on_pr.comment_on_pr('```\n%s\n```' % text)
print text
eintr_be_gone(finalize)

Loading…
Cancel
Save