diff options
author | Eugeni Dodonov <eugeni.dodonov@intel.com> | 2011-11-08 15:05:33 -0200 |
---|---|---|
committer | Eugeni Dodonov <eugeni.dodonov@intel.com> | 2011-11-09 11:50:22 -0200 |
commit | 02d78df334cfd82e57c64bd9ba09691e2bac728a (patch) | |
tree | 89ddded2363139c5cd4ab71821b29f4406f559d3 | |
parent | 26d3015b56632173112209ddff7c69e82cae069c (diff) |
intel_gpu_top: fix tabbing
This standardizes on using tab characters instead of white spaces in cases
those were mixed.
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
-rw-r--r-- | tools/intel_gpu_top.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index e815c42..8fcd82d 100644 --- a/tools/intel_gpu_top.c +++ b/tools/intel_gpu_top.c @@ -140,7 +140,7 @@ struct powerdata float watts_gfx; }; - static void +static void get_cpu_stat(struct cpudata *cpu) { FILE *file; @@ -166,7 +166,7 @@ get_cpu_stat(struct cpudata *cpu) */ #define USE_I915_EMON_STATUS 0 - static char* +static char* get_battery_file(char *battery) { /* The format is /proc/acpi/battery/BAT?/state */ @@ -260,9 +260,9 @@ static void linux_print(FILE *out, struct cpudata *cpu, struct cpudata *oldcpu, static unsigned long gettime(void) { - struct timeval t; - gettimeofday(&t, NULL); - return (t.tv_usec + (t.tv_sec * 1000000)); + struct timeval t; + gettimeofday(&t, NULL); + return (t.tv_usec + (t.tv_sec * 1000000)); } static int @@ -494,10 +494,10 @@ static void ring_sample(struct ring *ring) static void ring_print_header(FILE *out, struct ring *ring) { - fprintf(out, "%s\t%s.ops\t", - ring->name, + fprintf(out, "%s\t%s.ops\t", + ring->name, ring->name - ); + ); } static void ring_print(struct ring *ring, unsigned long samples_per_sec) @@ -580,8 +580,8 @@ int main(int argc, char **argv) struct powerdata power; char *battery = BATTERY, *battery_file = NULL; char *debugfs = DEBUGFS; - int do_perf=0; - char *perf_output=NULL; + int do_perf=0; + char *perf_output=NULL; #endif /* Parse options? */ @@ -604,24 +604,24 @@ int main(int argc, char **argv) else { output = fopen(optarg, "w"); #if HAVE_LINUX_FEATURES - perf_output = (char *)malloc(strlen(optarg) + 5); - sprintf(perf_output, "%s.perf", optarg); + perf_output = (char *)malloc(strlen(optarg) + 5); + sprintf(perf_output, "%s.perf", optarg); #endif - } + } if (!output) { perror("fopen"); exit(1); } break; - case 'p': + case 'p': #ifndef HAVE_LINUX_FEATURES - fprintf(stderr, "Error: Linux-specific bits not enabled\n"); - exit(1); + fprintf(stderr, "Error: Linux-specific bits not enabled\n"); + exit(1); #else - do_perf=1; + do_perf=1; #endif - break; + break; case 'h': usage(argv[0]); exit(0); @@ -642,30 +642,30 @@ int main(int argc, char **argv) init_instdone_definitions(devid); #ifdef HAVE_LINUX_FEATURES - if (do_perf) { - int perf_pid = fork(); - if (perf_pid < 0) { - perror("fork"); - exit(1); - } - if (perf_pid > 0) { - const char *perf_cmd = "perf record -a"; - int res; - if (perf_output) { - /* Output to a log file */ - char *cmdline = (char *)malloc(strlen(perf_cmd) + - strlen(perf_output) + 4); - sprintf(cmdline, "%s -o %s", perf_cmd, perf_output); - res = system(cmdline); - free(cmdline); - } else { - res = system("perf record -a"); - } - if (res < 0) - perror("Running perf"); - exit(0); - } - } + if (do_perf) { + int perf_pid = fork(); + if (perf_pid < 0) { + perror("fork"); + exit(1); + } + if (perf_pid > 0) { + const char *perf_cmd = "perf record -a"; + int res; + if (perf_output) { + /* Output to a log file */ + char *cmdline = (char *)malloc(strlen(perf_cmd) + + strlen(perf_output) + 4); + sprintf(cmdline, "%s -o %s", perf_cmd, perf_output); + res = system(cmdline); + free(cmdline); + } else { + res = system("perf record -a"); + } + if (res < 0) + perror("Running perf"); + exit(0); + } + } #endif /* Do we have a command to run? */ @@ -930,8 +930,8 @@ int main(int argc, char **argv) intel_register_access_fini(); #if HAVE_LINUX_FEATURES - if (perf_output != NULL) - free(perf_output); + if (perf_output != NULL) + free(perf_output); #endif return 0; |