diff options
Diffstat (limited to 'tools/perf/builtin-buildid-cache.c')
-rw-r--r-- | tools/perf/builtin-buildid-cache.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index d93bff7fc0e4..632efc6b79a0 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c | |||
@@ -38,19 +38,7 @@ static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid) | |||
38 | 38 | ||
39 | static int build_id_cache__kcore_dir(char *dir, size_t sz) | 39 | static int build_id_cache__kcore_dir(char *dir, size_t sz) |
40 | { | 40 | { |
41 | struct timeval tv; | 41 | return fetch_current_timestamp(dir, sz); |
42 | struct tm tm; | ||
43 | char dt[32]; | ||
44 | |||
45 | if (gettimeofday(&tv, NULL) || !localtime_r(&tv.tv_sec, &tm)) | ||
46 | return -1; | ||
47 | |||
48 | if (!strftime(dt, sizeof(dt), "%Y%m%d%H%M%S", &tm)) | ||
49 | return -1; | ||
50 | |||
51 | scnprintf(dir, sz, "%s%02u", dt, (unsigned)tv.tv_usec / 10000); | ||
52 | |||
53 | return 0; | ||
54 | } | 42 | } |
55 | 43 | ||
56 | static bool same_kallsyms_reloc(const char *from_dir, char *to_dir) | 44 | static bool same_kallsyms_reloc(const char *from_dir, char *to_dir) |