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: <20140508084246.GA1659@gmail.com>
Date:	Thu, 8 May 2014 10:42:46 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Namhyung Kim <namhyung@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Jiri Olsa <jolsa@...hat.com>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Stephane Eranian <eranian@...gle.com>,
	David Ahern <dsahern@...il.com>
Subject: Re: [PATCH v5 1/2] perf record: Propagate exit status of a command
 line workload


* Peter Zijlstra <peterz@...radead.org> wrote:

> On Thu, May 08, 2014 at 04:59:53PM +0900, Namhyung Kim wrote:
> > Currently perf record doesn't propagate the exit status of a workload
> > given by the command line.  But sometimes it'd useful if it's
> > propagated so that a monitoring script can handle errors
> > appropriately.
> > 
> > To do that, it got rid of exit handlers and run/call them directly in
> > the __cmd_record().  I don't see any reason why those are in a form of
> > exit handlers in the first place.  Also it cleaned up the resource
> > management code in record__exit().
> > 
> > With this change, perf record returns the child exit status in case of
> > normal termination and send signal to itself when terminated by signal.
> > 
> > Example run of Stephane's case:
> > 
> >   $ perf record true && echo yes || echo no
> >   [ perf record: Woken up 1 times to write data ]
> >   [ perf record: Captured and wrote 0.013 MB perf.data (~589 samples) ]
> >   yes
> > 
> >   $ perf record false && echo yes || echo no
> >   [ perf record: Woken up 1 times to write data ]
> >   [ perf record: Captured and wrote 0.013 MB perf.data (~589 samples) ]
> >   no
> > 
> > Jiri's case (error in parent):
> > 
> >   $ perf record -m 10G true && echo yes || echo no
> >   rounding mmap pages size to 17179869184 bytes (4194304 pages)
> >   failed to mmap with 12 (Cannot allocate memory)
> >   no
> > 
> > And Peter's case (interrupted by signal):
> > 
> >   $ while :; do perf record sleep 1; done
> >   ^C[ perf record: Woken up 1 times to write data ]
> >   [ perf record: Captured and wrote 0.014 MB perf.data (~593 samples) ]
> 
> Thanks!
> 
> Acked-by: Peter Zijlstra <peterz@...radead.org>

Very nice!

Acked-by: Ingo Molnar <mingo@...nel.org>

Thanks,

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