Hi Irina,

On Fri, Sep 21, 2012 at 1:13 AM, Irina Tirdea <irina.tir...@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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to