summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa5f0f3)
raw | patch | inline | side by side (parent: aa5f0f3)
author | Vincent Brillault <git@lerya.net> | |
Sat, 23 Aug 2014 07:50:13 +0000 (09:50 +0200) | ||
committer | Vincent Brillault <git@lerya.net> | |
Sat, 28 Feb 2015 06:35:41 +0000 (07:35 +0100) |
src/turbostat.c | patch | blob | history |
diff --git a/src/turbostat.c b/src/turbostat.c
index 5a2bf2bea03679035eb83a6339c9506f8f7279eb..8c7af14c34599fd138d51e9a1195a9e9ffb8860b 100644 (file)
--- a/src/turbostat.c
+++ b/src/turbostat.c
interval_float = tv_delta.tv_sec + tv_delta.tv_usec/1000000.0;
- snprintf(name, sizeof(name), "cpu%02d", t->cpu_id);
+ ssnprintf(name, sizeof(name), "cpu%02d", t->cpu_id);
if (!skip_c0)
turbostat_submit(name, "percent", "c0", 100.0 * t->mperf/t->tsc);
if (!(t->flags & CPU_IS_FIRST_THREAD_IN_CORE))
goto done;
- snprintf(name, sizeof(name), "core%02d", c->core_id);
+ ssnprintf(name, sizeof(name), "core%02d", c->core_id);
if (do_core_cstate & (1 << 3))
turbostat_submit(name, "percent", "c3", 100.0 * c->c3/t->tsc);
if (!(t->flags & CPU_IS_FIRST_CORE_IN_PACKAGE))
goto done;
- snprintf(name, sizeof(name), "pkg%02d", p->package_id);
+ ssnprintf(name, sizeof(name), "pkg%02d", p->package_id);
if (do_ptm)
turbostat_submit(NULL, "temperature", name, p->pkg_temp_c);