From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754724AbcCCMvp (ORCPT ); Thu, 3 Mar 2016 07:51:45 -0500 Received: from www.linutronix.de ([62.245.132.108]:58174 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751243AbcCCMvo (ORCPT ); Thu, 3 Mar 2016 07:51:44 -0500 Subject: Re: [PATCH v3] kernel: sched: fix preempt_disable_ip recodring for preempt_disable() To: Daniel Bristot de Oliveira , Steven Rostedt References: <1455290420-23831-1-git-send-email-bigeasy@linutronix.de> <20160225091530.4dc3481c@gandalf.local.home> <20160226135456.GB18244@linutronix.de> <56D0A364.5060203@redhat.com> Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org From: Sebastian Andrzej Siewior Message-ID: <56D8335D.3050003@linutronix.de> Date: Thu, 3 Mar 2016 13:51:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D0A364.5060203@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/26/2016 08:11 PM, Daniel Bristot de Oliveira wrote: > > > On 02/26/2016 10:54 AM, Sebastian Andrzej Siewior wrote: >> - trace_preempt_off(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1)); >> + trace_preempt_off(CALLER_ADDR0, get_lock_parent_ip()); > > If !lock_functions(CALLER_ADDR0), the start/stop_critical_timing() will > be called with parent_ip == ip. > > Hence, the following trace on start_critical_timing(): > > __trace_function(tr, ip, parent_ip, flags, preempt_count()); > > Will show the function calling itself. > > Is it a problem? am I missing something? It might be that for !lock_functions() we get the same caller. But then get_parent_ip() was not inlined (in my .o file) so ADDR1 in get_parent_ip() should correspond to ADDR0 in the inline case. > -- Daniel Sebastian