gcc -g -fpic -c msr.c cpuid.c rapl.c
rapl.c: In function ‘init_rapl’:
rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
err = read_rapl_units();
^
rapl.c: In function ‘get_os_freq’:
rapl.c:1307:25: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
out = sprintf(path, "%s%u%s", "/sys/devices/system/cpu/cpu",cpu,"/cpufreq/c
^
rapl.c:1313:20: warning: format ‘%u’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘uint64_t * {aka long unsigned int *}’ [-Wformat=]
fscanf(fp, "%u", freq);
^
gcc -g -shared -o librapl.so msr.o cpuid.o rapl.o
gcc -g -c msr.c cpuid.c rapl.c
rapl.c: In function ‘init_rapl’:
rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
err = read_rapl_units();
^
rapl.c: In function ‘get_os_freq’:
rapl.c:1307:25: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
out = sprintf(path, "%s%u%s", "/sys/devices/system/cpu/cpu",cpu,"/cpufreq/c
^
rapl.c:1313:20: warning: format ‘%u’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘uint64_t * {aka long unsigned int *}’ [-Wformat=]
fscanf(fp, "%u", freq);
^
ar rcs librapl.a msr.o cpuid.o rapl.o
gcc -g power_gadget.c -I. -L. -o power_gadget ./librapl.a -lm
power_gadget.c: In function ‘do_print_energy_info’:
power_gadget.c:178:24: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
fprintf(stdout,"%s,%llu,%.4lf,", time_buffer, tsc, total_elapsed_time);
^
power_gadget.c:181:29: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
fprintf(stdout, "%u,", freq);
^
power_gadget.c:223:20: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
fprintf(stdout,"TSC=%llu\n", tsc);
^