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: <20131015122232.GA4942@krava.redhat.com>
Date:	Tue, 15 Oct 2013 14:22:32 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Namhyung Kim <namhyung@...nel.org>,
	David Ahern <dsahern@...il.com>, acme@...stprotocols.net,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Mike Galbraith <efault@....de>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf record: mmap output file - v2

On Tue, Oct 15, 2013 at 09:25:40AM +0200, Ingo Molnar wrote:
> 
> * Namhyung Kim <namhyung@...nel.org> wrote:
> 
> > > 3)
> > >
> > > The rec->bytes_at_mmap_start field feels a bit weird. If I read the code 
> > > correctly, in every 'perf record' invocation, rec->bytes_written starts at 
> > > 0 - i.e. we don't have repeat invocations of cmd_record().
> > 
> > rec->bytes_written is updated when it writes to the output file for 
> > synthesizing COMM/MMAP events (this mmap output is not used at that 
> > time).
> 
> Btw., while looking into it, I think advance_output() needlessly 
> obfuscates as well:
> 
> static void advance_output(struct perf_record *rec, size_t size)
> {
>         rec->bytes_written += size;
> }
> 
> that code should just be written open coded.
> 
> So I think all this needs a few good rounds of cleanups, before we can 
> complicate it with a new feature. (the cleanups can be on top of the 
> feature, if they go in at the same time.)

I sent some file code cleanup week ago, I'll rebase
and resend it soon:
http://marc.info/?l=linux-kernel&m=138113836428425&w=2

it's mostly about centralizing the code into file
object.. got no comments so far

jirka
--
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