aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/codegen
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-09-19 14:11:21 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-09-19 14:11:21 -0700
commit7fcdd7add07a4390c8d2e430d519602206433159 (patch)
treeba643ee0e42ce7539adbea7c2eb00c952ed5d113 /tools/codegen
parent5e5b73ccf0f6acaabaf921038eb9df4476195a0a (diff)
Really spell out code generation
Diffstat (limited to 'tools/codegen')
-rwxr-xr-xtools/codegen/core/gen_stats_data.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py
index 8359734c84..10ad0cc831 100755
--- a/tools/codegen/core/gen_stats_data.py
+++ b/tools/codegen/core/gen_stats_data.py
@@ -147,7 +147,8 @@ def gen_bucket_code(histogram):
shift_data = find_ideal_shift(code_bounds[first_nontrivial:], 256 * histogram.buckets)
#print first_nontrivial, shift_data, bounds
#if shift_data is not None: print [hex(x >> shift_data[0]) for x in code_bounds[first_nontrivial:]]
- code = 'value = GPR_CLAMP(value, 0, %d);\n' % histogram.max
+ code = '\n/* Automatically generated by tools/codegen/core/gen_stats_data.py */\n'
+ code += 'value = GPR_CLAMP(value, 0, %d);\n' % histogram.max
map_table = gen_map_table(code_bounds[first_nontrivial:], shift_data)
if first_nontrivial is None:
code += ('GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_%s, value);\n'
@@ -407,4 +408,3 @@ with open('src/core/lib/debug/stats_data_bq_schema.sql', 'w') as S:
for counter in inst_map['Counter']:
columns.append(('%s_per_iteration' % counter.name, 'FLOAT'))
print >>S, ',\n'.join('%s:%s' % x for x in columns)
-