lkml.org 
[lkml]   [2013]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v0 07/71] perf tools: Record whether a dso is 64-bit
On 12/11/13, 5:36 AM, Alexander Shishkin wrote:
> diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
> index a0c7c59..80817ec 100644
> --- a/tools/perf/util/dso.c
> +++ b/tools/perf/util/dso.c
> @@ -446,6 +446,7 @@ struct dso *dso__new(const char *name)
> dso->cache = RB_ROOT;
> dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND;
> dso->data_type = DSO_BINARY_TYPE__NOT_FOUND;
> + dso->is_64_bit = (sizeof(void *) == 8);

Isnt' that going to record the bitness of perf when it is compiled?

> dso->loaded = 0;
> dso->rel = 0;
> dso->sorted_by_name = 0;
> diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
> index 384f2d9..62680e1 100644
> --- a/tools/perf/util/dso.h
> +++ b/tools/perf/util/dso.h
> @@ -91,6 +91,7 @@ struct dso {
> u8 annotate_warned:1;
> u8 sname_alloc:1;
> u8 lname_alloc:1;
> + u8 is_64_bit:1;

The is_64_bit name seems a bit hardcoded. We need something similar for
perf-trace to set the audit machine type for resolving syscalls. How
about having this field set a machine type rather than a "64-bit" flag?

David


\
 
 \ /
  Last update: 2013-12-12 07:41    [W:0.704 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site