[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1405586590-13657-1-git-send-email-adrian.hunter@intel.com>
Date: Thu, 17 Jul 2014 11:43:08 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Namhyung Kim <namhyung@...il.com>,
Paul Mackerras <paulus@...ba.org>,
Stephane Eranian <eranian@...gle.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] perf tools: Fix incorrect fd error comparison
On 07/16/2014 05:20 PM, Jiri Olsa wrote:> On Mon, Jul 14, 2014 at 01:02:42PM +0300, Adrian Hunter wrote:
>> Add 'data_status' to record whether a dso has data
>> (i.e. an object file) as follows:
>>
>> dso->data_status meaning
>> ----------------------------------
>> 0 don't know
>> -1 no data
>> 1 has data
>
> please add enum for this
Ok
>
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
>> ---
>> tools/perf/util/dso.c | 5 ++++-
>> tools/perf/util/dso.h | 1 +
>> 2 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
>> index fc006fe..91a4eb4 100644
>> --- a/tools/perf/util/dso.c
>> +++ b/tools/perf/util/dso.c
>> @@ -556,8 +556,11 @@ static ssize_t data_read_offset(struct dso *dso, u64 offset,
>> ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine,
>> u64 offset, u8 *data, ssize_t size)
>> {
>> - if (dso__data_fd(dso, machine) < 0)
>> + if (dso__data_fd(dso, machine) < 0) {
>> + dso->data.data_status = -1;
>> return -1;
>> + }
>> + dso->data.data_status = 1;
>
> we have more callers to dso__data_fd, so I think we want
> to setup dso->data.data_status within dso__data_fd
Ok. Here are 2 patches because I noticed another thing.
Adrian Hunter (2):
perf tools: Fix incorrect fd error comparison
perf tools: Record whether a dso has data
tools/perf/util/dso.c | 27 +++++++++++++++++----------
tools/perf/util/dso.h | 7 +++++++
2 files changed, 24 insertions(+), 10 deletions(-)
--
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