Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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:29: 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/cpuinfo_cur_freq");
- ~^
- %lu
- rapl.c:1313:22: 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);
- ~^
- %lu
- 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:29: 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/cpuinfo_cur_freq");
- ~^
- %lu
- rapl.c:1313:22: 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);
- ~^
- %lu
- ar rcs librapl.a msr.o cpuid.o rapl.o
- gcc -g power_gadget.c -I. -L. -lm -o power_gadget ./librapl.a
- power_gadget.c: In function ‘do_print_energy_info’:
- power_gadget.c:178:31: 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);
- ~~~^
- %lu
- power_gadget.c:181:31: 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);
- ~^
- %lu
- power_gadget.c:223:28: 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);
- ~~~^
- %lu
- ./librapl.a(rapl.o): In function `compute_Y':
- /mnt/Storage/Corey/power_gadget/rapl.c:516: undefined reference to `log'
- collect2: error: ld returned 1 exit status
- Makefile:14: recipe for target 'power_gadget_static' failed
- make: *** [power_gadget_static] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement