lkml.org 
[lkml]   [2012]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/4] perf tools: configure tmp path at build time
From
Hi Irina,

On Fri, Sep 21, 2012 at 1:13 AM, Irina Tirdea <irina.tirdea@gmail.com> wrote:
> diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
> index b442ee4..c5b4632 100644
> --- a/tools/perf/util/map.c
> +++ b/tools/perf/util/map.c
> @@ -59,7 +59,8 @@ struct map *map__new(struct list_head *dsos__list, u64 start, u64 len,
> no_dso = is_no_dso_memory(filename);
>
> if (anon) {
> - snprintf(newfilename, sizeof(newfilename), "/tmp/perf-%d.map", pid);
> + snprintf(newfilename, sizeof(newfilename),
> + PERF_TMP_DIR "/perf-%d.map", pid);
> filename = newfilename;
> }

[snip]

> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index e2e8c69..eb671d5 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -1051,7 +1051,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
>
> dso->adjust_symbols = 0;
>
> - if (strncmp(dso->name, "/tmp/perf-", 10) == 0) {
> + if (strncmp(dso->name, PERF_TMP_DIR "/perf-", 10) == 0) {
> struct stat st;
>
> if (lstat(dso->name, &st) < 0)

Just to point out: these two path names are actually part of a
JIT/perf integration ABI. I'm OK with using PERF_TMP_DIR here but you
really ought to update tools/perf/Documentation/jit-interface.txt.


\
 
 \ /
  Last update: 2012-09-21 10:21    [W:1.528 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site