lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABPqkBSVF3S=Yy6_Lq2DtvXkLLgckuRXYeo1Xaqs1fmU3G3kkA@mail.gmail.com>
Date:	Mon, 14 Jul 2014 19:54:53 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH 3/4] perf tools: add core support for sampling intr
 machine state regs

On Fri, Jul 11, 2014 at 10:25 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> On Wed, Jul 09, 2014 at 12:15:58AM +0200, Stephane Eranian wrote:
>> Add the infrastructure to setup, collect and report the interrupt
>> machine state regs which can be captured by the kernel.
>>
>
> SNIP
>
>> index 8606175..00e45d1 100644
>> --- a/tools/perf/util/evsel.c
>> +++ b/tools/perf/util/evsel.c
>> @@ -626,6 +626,11 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
>>       if (opts->call_graph_enabled)
>>               perf_evsel__config_callgraph(evsel, opts);
>>
>> +     if (opts->sample_intr_regs) {
>> +             attr->sample_regs_intr = PERF_REGS_MASK;
>> +             perf_evsel__set_sample_bit(evsel, REGS_INTR);
>> +     }
>> +
>>       if (target__has_cpu(&opts->target))
>>               perf_evsel__set_sample_bit(evsel, CPU);
>>
>> @@ -979,6 +984,7 @@ static size_t perf_event_attr__fprintf(struct perf_event_attr *attr, FILE *fp)
>>       ret += PRINT_ATTR_X64(branch_sample_type);
>>       ret += PRINT_ATTR_X64(sample_regs_user);
>>       ret += PRINT_ATTR_U32(sample_stack_user);
>> +     ret += PRINT_ATTR_X64(sample_regs_intr);
>>
>>       ret += fprintf(fp, "%.60s\n", graph_dotted_line);
>>
>> @@ -1468,6 +1474,23 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
>>               array++;
>>       }
>>
>> +     data->intr_regs.abi = PERF_SAMPLE_REGS_ABI_NONE;
>
> not necessary, data is zeroed in the top
>
Don't like that too much. You are using an enum. So why not explicitly
initialize instead of relying on ABI_NONE = 0.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ