From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BD631A06CB for ; Mon, 28 Sep 2015 10:08:50 +1000 (AEST) Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 27 Sep 2015 20:08:47 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 7FAEAC9003C for ; Sun, 27 Sep 2015 19:59:48 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t8S08jxH51052786 for ; Mon, 28 Sep 2015 00:08:45 GMT Received: from d01av03.pok.ibm.com (localhost [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t8S08iiL019561 for ; Sun, 27 Sep 2015 20:08:44 -0400 From: Stewart Smith To: Torsten Duwe , linuxppc-dev@lists.ozlabs.org Cc: live-patching@vger.kernel.org Subject: Re: -mprofile-kernel vs. notrace in ppc64(le) Linux kernels In-Reply-To: <20150926143008.GA14606@lst.de> References: <20150926143008.GA14606@lst.de> Date: Mon, 28 Sep 2015 10:08:30 +1000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Torsten Duwe writes: > As I mentioned earlier this year, it's a bad idea to call _mcount from > MMU helper functions (e.g. hash_page...), when the profiling/tracing/ > live-patching/whatever framewok might in turn cause another such fault. > Jikos suggested to use fine-grained control of these functions with the > "notrace" keyword in the Linux kernel. It is mapped to GCC's (4.8, FWIW) > __attribute__((no_instrument_function)), which, to my surprise, works > for -p and -pg nicely, but does not affect -mprofile-kernel at all! IIRC from when I was working on GCOV support in OPAL firmware (skiboot), this doesn't affect the code generated by -fprofile-arcs, so may not completely do what you want.