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]
Date:   Mon, 8 Oct 2018 21:13:13 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] perf record: encode -k clockid frequency into Perf
 trace


Hi,

On 08.10.2018 20:42, Arnaldo Carvalho de Melo wrote:
> Em Wed, Oct 03, 2018 at 07:57:12PM +0300, Alexey Budankov escreveu:
>>
>> Store -k clockid frequency into Perf trace to enable timestamps 
>> derived metrics conversion into wall clock time on reporting stage.
> 
> <SNIP>
> 
>> +++ b/tools/perf/util/env.h
>> @@ -63,6 +63,7 @@ struct perf_env {
>>  	struct numa_node	*numa_nodes;
>>  	struct memory_node	*memory_nodes;
>>  	unsigned long long	 memory_bsize;
>> +	size_t                   clockid_res_ns;
>>  };
>>  
>>  extern struct perf_env perf_env;
>> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
>> index 1ec1d9bc2d63..4ce5339158f7 100644
>> --- a/tools/perf/util/header.c
>> +++ b/tools/perf/util/header.c
>> @@ -1034,6 +1034,13 @@ static int write_auxtrace(struct feat_fd *ff,
>>  	return err;
>>  }
>>  
>> +static int write_clockid(struct feat_fd *ff,
>> +			 struct perf_evlist *evlist __maybe_unused)
>> +{
>> +	return do_write(ff, &ff->ph->env.clockid_res_ns,
>> +			sizeof(ff->ph->env.clockid_res_ns));
>> +}
>> +
> 
> Is sizeof(size_t) the same everywhere? I think you should encode this
> always as a u64, read it, assign it to a temp u64 var, write the u64 to
> the perf.data header, read it using do_read_u64, that will take care of
> endianness, then set it to the size_t in the ff->ph->env.clockid_res_ns,
> right?

Right. Let me take care of all that.

Thanks!
Alexey

> 
> I'm removing the patch till this gets sorted out,
> 
> Thanks,
> 
> - Arnaldo
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ