Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp672287ybx; Fri, 1 Nov 2019 09:24:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLEy0poC+HnWHA/HCmkH79WfquW6SzlhsNQ+00OYgc9Bv+a/GZorjBlTzk2YS4eGyMwd+s X-Received: by 2002:a17:906:e20d:: with SMTP id gf13mr10850387ejb.176.1572625447931; Fri, 01 Nov 2019 09:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572625447; cv=none; d=google.com; s=arc-20160816; b=f2LSjy6z7/7go5/O08EtByCWv29y4gdfQS5zHHSLRv+FcZxPy6N5A8ZkbUjZNQdnXg cpAMxfZV8HN2yN6kh9JsG0jnb0b3QY8JmUEJNVSpJS55voc8o2qEFU00sFcAdD1SIbn/ uJel2l4YA7EkFxWqcgks1CNstv2Oov7P/JeIeNcqAxt0SHUu/CfF1ehf9QS744kxR8v/ vlXOn1laZHKqRPpoJSHpsOj8JwMkFP9P4Y9g4PkjIkju8qNg2VFBuLh/IkCuc9rv46Wl Za41FEeGMmA+hFuroD9Or59v/GQU9E6PTCAnKPfkJVZ1mHGD4MPLvAITsHwgs1ogtEUw fSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kDxL/9y811Z5nJM6Y5gJFSYgQI7x3MvaiflUEhpC+a4=; b=KeIOBMxH3WvTK244M8nbDwuJMUgTMtwagXi4+6AxRRicAzArWrlwQ63muuAWDVCwE1 jKq+DF5NADyU8SiwCb+F61zTpRdGINEPspre0u/VFJ+YDjrtddeu6fIBIiRiQu+Sq1+M kfIPE5ax13kiPx/pNaKeuuxSNjYkPi/uRdZUPkvAvwm5LhMEfu6bubAHPwU8sBahHhqr wUjL+pywqg7Ian7MHmLRUO6QT26qvzobiQR+jyV+vw0b0Q2q1cW1MGgM4iR7S+HtDkJ8 SPQaN6ZDawsPrAfIB9vby6uxfM9TKIMU7TnsjAbqTSRCXzdV7/zpmnhZ1L4C/t3TiBgz oTgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzLMxhHT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si6061365ejm.93.2019.11.01.09.23.44; Fri, 01 Nov 2019 09:24:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TzLMxhHT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727183AbfKAQUn (ORCPT + 99 others); Fri, 1 Nov 2019 12:20:43 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33547 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbfKAQUm (ORCPT ); Fri, 1 Nov 2019 12:20:42 -0400 Received: by mail-lf1-f67.google.com with SMTP id y127so7632084lfc.0; Fri, 01 Nov 2019 09:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kDxL/9y811Z5nJM6Y5gJFSYgQI7x3MvaiflUEhpC+a4=; b=TzLMxhHTQ83j1KiZCts5nJ0fFYQ6I7amj6HjTJ1W8tF/mxgqsv8yFgHXeONrx9bspH DsPISG3I/Lof0f8vEHpEPeZikhCFl2LwE4UZ95B6OJ6Mcct2PklaUJY0Onjkj7F32X+P nSGI/IEmoChrva++IhyLaRaFArG6v0Nbn+nzg8a7yteLL8inGp2H1vgNugXu5qjhWpXJ RO6iYg0NTJtGAr/idELataxJXINKBvwvxMyzCrh+CaVhYHzsbmCti7zqP+fBEvhDhS+N PNuCwchiwlUuIwL8iGMYXYeaVYqWclhgCfANAo97bYkq6K84iTBkoopDg0DY33S5dY6y jlAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kDxL/9y811Z5nJM6Y5gJFSYgQI7x3MvaiflUEhpC+a4=; b=iYUlUr/fSqZjWH8/Zw5v8XboNaVVcVtIyIiI6U7Cioi4sCa8OaMn1kUA3SF6gWouHf XpC8+9tlhkY6Z6hxr0QK3X5+8KkrqKTi3bi4/kTLmsdtQ2NGbwNud705YP3wor9Jlu4K PxKc3qEhVxhnYSx7E4h+IHRTvgJyj6N1HZGxgfNZpCys8D8a4mjL4piYl/KDUbHT78VG 8QTqlTQTvmcqX+BNpqWFWXY05TIQD7dUaoFHSMfibC4wsr5vIcevG4SvCgydvR4Qa/sO PNQiHvQFWi0E/D0tyQQC6UQm4aHbSYxfnnfTSon9rch0zWRXSmzqbWkN1BBUNBNZSve2 eeIg== X-Gm-Message-State: APjAAAWcgGb/LPviSO7uzSKPZotv5zKqA9Kbr6v7riGUJKGOs+IWL/ky NUToq9ZXshqc2/M8LhSLbibdxyI+X+65FRFBPgM= X-Received: by 2002:ac2:4919:: with SMTP id n25mr2371545lfi.58.1572625240350; Fri, 01 Nov 2019 09:20:40 -0700 (PDT) MIME-Version: 1.0 References: <20191029200001.9640-1-jim.cromie@gmail.com> <07db7036-b46f-c157-5737-e3d96c808f14@rasmusvillemoes.dk> In-Reply-To: <07db7036-b46f-c157-5737-e3d96c808f14@rasmusvillemoes.dk> From: jim.cromie@gmail.com Date: Fri, 1 Nov 2019 10:20:14 -0600 Message-ID: Subject: Re: [PATCH 01/16] dyndbg: drop trim_prefix, obsoleted by __FILE__s relative path To: Rasmus Villemoes Cc: Jason Baron , LKML , Greg KH , clang-built-linux@googlegroups.com, Jonathan Corbet , Randy Dunlap , linux-doc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cool, thanks! On Wed, Oct 30, 2019 at 3:20 PM Rasmus Villemoes wrote: > > On 29/10/2019 21.00, Jim Cromie wrote: > > Regarding: > > commit 2b6783191da7 ("dynamic_debug: add trim_prefix() to provide source-root relative paths") > > commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path") > > > > 2nd commit broke dynamic-debug's "file $fullpath" query form, but > > nobody noticed because 1st commit trimmed prefixes from control-file > > output, so the click-copy-pasting of fullpaths into new queries had > > ceased; that query form became unused. > > > > So remove the function and callers; its purpose was to strip the > > prefix from __FILE__, which is now gone. > > I agree with the intent, but I wonder if this is premature. I mean, the > -fmacro-prefix-map is only for gcc 8+, so this ends up printing the full > paths when the compiler is just a little old (and the kernel was built > out-of-tree). > > I don't think keeping the current workaround for a year or two more > should hurt; when int skip = strlen(__FILE__) - > strlen("lib/dynamic_debug.c"); evaluates to 0 (in-tree build, or build > with new enough gcc), I'm pretty sure gcc optimizes the rest of the > function away (it should know that strncmp(x, y, 0) gives 0, and even if > it didn't, the conditional assigns 0 to skip which it already is, so gcc > just needs to know that strncmp() is pure). > > > > > Also drop "file $fullpath" from docs, and tweak example to cite column > > 1 of control-file as valid "file $input". > > That part certainly makes sense, since the $fullpath hasn't actually > been in the control file for a long time. > > Rasmus > I agree. Ive split the patch, am keeping the doc change.