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] [thread-next>] [day] [month] [year] [list]
Message-ID: <d190206e-f2ea-dbf6-f6b4-5bb062980ad2@linux.intel.com>
Date:   Mon, 6 Dec 2021 14:22:11 +0300
From:   "Bayduraev, Alexey V" <alexey.v.bayduraev@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Alexander Antonov <alexander.antonov@...ux.intel.com>,
        Alexei Budankov <abudankov@...wei.com>,
        Riccardo Mancini <rickyman7@...il.com>
Subject: Re: [PATCH v12 09/16] perf record: Introduce bytes written stats

On 05.12.2021 18:14, Jiri Olsa wrote:

<SNIP>

>>  static int record__write(struct record *rec, struct mmap *map __maybe_unused,
>> @@ -210,13 +223,15 @@ static int record__write(struct record *rec, struct mmap *map __maybe_unused,
>>  		return -1;
>>  	}
>>  
>> -	if (!(map && map->file))
>> +	if (map && map->file)
>> +		thread->bytes_written += size;
>> +	else
>>  		rec->bytes_written += size;
> 
> ok, that's why ;-) do we actually stil need rec->bytes_written?
> can't we count that under synthesizing main thread->bytes_written?

Hi Jiri,

No, we still need rec->bytes_written because it is used for 
the header in "perf.data/data", and it cannot be replaced by
threads[0].bytes_written because threads[0] is used for
"perf.data/data.0".

Regards,
Alexey

> 
> jirka
> 
>>  
>>  	if (record__output_max_size_exceeded(rec) && !done) {
>>  		fprintf(stderr, "[ perf record: perf size limit reached (%" PRIu64 " KB),"
>>  				" stopping session ]\n",
>> -				rec->bytes_written >> 10);
>> +				record__bytes_written(rec) >> 10);
>>  		done = 1;
>>  	}
>>  
>> -- 
>> 2.19.0
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ