[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tx8chvzb.fsf@sejong.aot.lge.com>
Date: Tue, 27 May 2014 10:05:28 +0900
From: Namhyung Kim <namhyung@...il.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Jean Pihet <jean.pihet@...aro.org>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 06/14] perf tools: Cache dso data file descriptor
Hi Jiri,
On Thu, 15 May 2014 19:23:27 +0200, Jiri Olsa wrote:
[SNIP]
> +static void data_close(void)
> +{
> + bool cache_fd = may_cache_fd();
> +
> + if (!cache_fd)
> + close_first_dso();
> +}
Why do you do this at close()? As long as there's no attempt to open a
new file, we can keep existing fd, no?
> +
> +void dso__data_close(struct dso *dso)
> +{
> + if (dso->data.fd >= 0)
> + data_close();
> +}
Hmm.. it's confusing dso__data_close(dso) closes an other dso rather
than the given dso. And this dso__data_close() is not paired with any
_open() also these close calls make me confusing which one to use. ;-p
Thanks
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists