Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. gcc -g -fpic -c msr.c cpuid.c rapl.c
  2. rapl.c: In function ‘init_rapl’:
  3. rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
  4. err = read_rapl_units();
  5. ^~~~~~~~~~~~~~~
  6. rapl.c: In function ‘get_os_freq’:
  7. 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=]
  8. out = sprintf(path, "%s%u%s", "/sys/devices/system/cpu/cpu",cpu,"/cpufreq/cpuinfo_cur_freq");
  9. ~^
  10. %lu
  11. 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=]
  12. fscanf(fp, "%u", freq);
  13. ~^
  14. %lu
  15. gcc -g -shared -o librapl.so msr.o cpuid.o rapl.o
  16. gcc -g -c msr.c cpuid.c rapl.c
  17. rapl.c: In function ‘init_rapl’:
  18. rapl.c:321:11: warning: implicit declaration of function ‘read_rapl_units’ [-Wimplicit-function-declaration]
  19. err = read_rapl_units();
  20. ^~~~~~~~~~~~~~~
  21. rapl.c: In function ‘get_os_freq’:
  22. 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=]
  23. out = sprintf(path, "%s%u%s", "/sys/devices/system/cpu/cpu",cpu,"/cpufreq/cpuinfo_cur_freq");
  24. ~^
  25. %lu
  26. 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=]
  27. fscanf(fp, "%u", freq);
  28. ~^
  29. %lu
  30. ar rcs librapl.a msr.o cpuid.o rapl.o
  31. gcc -g power_gadget.c -I. -L. -lm -o power_gadget ./librapl.a
  32. power_gadget.c: In function ‘do_print_energy_info’:
  33. 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=]
  34. fprintf(stdout,"%s,%llu,%.4lf,", time_buffer, tsc, total_elapsed_time);
  35. ~~~^
  36. %lu
  37. 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=]
  38. fprintf(stdout, "%u,", freq);
  39. ~^
  40. %lu
  41. 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=]
  42. fprintf(stdout,"TSC=%llu\n", tsc);
  43. ~~~^
  44. %lu
  45. ./librapl.a(rapl.o): In function `compute_Y':
  46. /mnt/Storage/Corey/power_gadget/rapl.c:516: undefined reference to `log'
  47. collect2: error: ld returned 1 exit status
  48. Makefile:14: recipe for target 'power_gadget_static' failed
  49. make: *** [power_gadget_static] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement