[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180516135539.GA1230@kernel.org>
Date: Wed, 16 May 2018 10:55:39 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>, Jiri Olsa <jolsa@...hat.com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH V1 06/19] perf tools: Fix kernel_start for PTI on x86
Em Wed, May 16, 2018 at 04:45:41PM +0300, Adrian Hunter escreveu:
> On 16/05/18 16:00, Arnaldo Carvalho de Melo wrote:
> > 2303 bool machine__is(struct machine *machine, const char *arch)
> > 2304 {
> > 2305 return machine && machine->env && !strcmp(machine->env->arch, arch);
> > 2306 }
> > 2307
> > 2308 int machine__get_kernel_start(struct machine *machine)
> > 2309 {
> > (gdb) p machine
> > $1 = (struct machine *) 0xc55548
> > (gdb) p machine->env
> > $2 = (struct perf_env *) 0xc06400 <perf_env>
> > (gdb) p machine-env->arch
> > No symbol "env" in current context.
> > (gdb) p machine->env->arch
> > $3 = 0x0
> > (gdb)
> If there is no perf_data then perf_session__new() uses perf_env but it seems
> perf_env.arch is not initialized. Would it be OK to initialize
> perf_env.arch and perf_env.nr_cpus_avail?
I guess so, to make that always available, i.e. no perf.data? Those
should reflect the running machine environment.
So a preparatory patch that makes that the case would be good, I think.
- Arnaldo
Powered by blists - more mailing lists