From ea0afee0e452e314ad695f671706f6bc9d9133d5 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 4 Sep 2018 17:21:31 -0700 Subject: [PATCH] app/trace: add g_ to global variable names Signed-off-by: Jim Harris Change-Id: Ia6b9d6ee8ce1339f331788f418dbb8b3f5d68b3b Reviewed-on: https://review.gerrithub.io/424614 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- app/trace/trace.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/trace/trace.cpp b/app/trace/trace.cpp index 209023f4c..7a755dcb6 100644 --- a/app/trace/trace.cpp +++ b/app/trace/trace.cpp @@ -79,12 +79,12 @@ struct object_stats { struct object_stats g_stats[SPDK_TRACE_MAX_OBJECT]; -static char *exe_name; -static int verbose = 1; +static char *g_exe_name; +static int g_verbose = 1; -static uint64_t tsc_rate; -static uint64_t first_tsc = 0x0; -static uint64_t last_tsc = -1ULL; +static uint64_t g_tsc_rate; +static uint64_t g_first_tsc = 0x0; +static uint64_t g_last_tsc = -1ULL; static float get_us_from_tsc(uint64_t tsc, uint64_t tsc_rate) @@ -204,7 +204,7 @@ static void process_event(struct spdk_trace_entry *e, uint64_t tsc_rate, uint64_t tsc_offset, uint16_t lcore) { - if (verbose) { + if (g_verbose) { print_event(e, tsc_rate, tsc_offset, lcore); } } @@ -259,11 +259,11 @@ populate_events(struct spdk_trace_history *history) * ensure we only print data for the subset of time where we have * data across all reactors. */ - if (e[first].tsc > first_tsc) { - first_tsc = e[first].tsc; + if (e[first].tsc > g_first_tsc) { + g_first_tsc = e[first].tsc; } - if (e[last].tsc < last_tsc) { - last_tsc = e[last].tsc; + if (e[last].tsc < g_last_tsc) { + g_last_tsc = e[last].tsc; } i = first; @@ -284,7 +284,7 @@ populate_events(struct spdk_trace_history *history) static void usage(void) { fprintf(stderr, "usage:\n"); - fprintf(stderr, " %s