From 4454af55e1eb3862534d8dfa3d0f5d1066b55328 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Tue, 1 May 2018 09:45:01 -0700 Subject: Update stats generator --- tools/codegen/core/gen_stats_data.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'tools/codegen/core/gen_stats_data.py') diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py index 5c9d9e5ea5..3ebd00d049 100755 --- a/tools/codegen/core/gen_stats_data.py +++ b/tools/codegen/core/gen_stats_data.py @@ -230,13 +230,11 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H: print >> H, "#ifndef GRPC_CORE_LIB_DEBUG_STATS_DATA_H" print >> H, "#define GRPC_CORE_LIB_DEBUG_STATS_DATA_H" print >> H + print >> H, "#include " + print >> H print >> H, "#include " print >> H, "#include \"src/core/lib/iomgr/exec_ctx.h\"" print >> H - print >> H, "#ifdef __cplusplus" - print >> H, "extern \"C\" {" - print >> H, "#endif" - print >> H for typename, instances in sorted(inst_map.items()): print >> H, "typedef enum {" @@ -289,10 +287,6 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H: print >> H, "extern void (*const grpc_stats_inc_histogram[%d])(int x);" % len( inst_map['Histogram']) - print >> H - print >> H, "#ifdef __cplusplus" - print >> H, "}" - print >> H, "#endif" print >> H print >> H, "#endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */" @@ -316,10 +310,13 @@ with open('src/core/lib/debug/stats_data.cc', 'w') as C: [C], ["Automatically generated by tools/codegen/core/gen_stats_data.py"]) - print >> C, "#include \"src/core/lib/debug/stats_data.h\"" + print >> C, "#include " + print >> C print >> C, "#include \"src/core/lib/debug/stats.h\"" + print >> C, "#include \"src/core/lib/debug/stats_data.h\"" + print >> C, "#include \"src/core/lib/gpr/useful.h\"" print >> C, "#include \"src/core/lib/iomgr/exec_ctx.h\"" - print >> C, "#include " + print >> C histo_code = [] for histogram in inst_map['Histogram']: -- cgit v1.2.3