Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6882475ybc; Thu, 28 Nov 2019 07:06:02 -0800 (PST) X-Google-Smtp-Source: APXvYqyuqZn7sV2vm2wXLTfV+XYU6cH5zzCQSOXPJOtm+2idRWexUzFUqyh735Jva2uKmG8AQXam X-Received: by 2002:a37:4cd4:: with SMTP id z203mr10354953qka.459.1574953562381; Thu, 28 Nov 2019 07:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953562; cv=none; d=google.com; s=arc-20160816; b=g2b6H7oUV6hguWjq7XuJ+wV1UIB3ociEchvQy6KrmpafZz7hfvHqPoLz/dhM7A7shq f3HXCWfMGUtZW+ItREqYSQvKUYXiNoQhcYiKhryqrAnCb6I4/wgaSWkS/y5pb8AX2AYv IapniGvJfy4sL+7e4RuZDft8vooZ1hW6BPTjfM73aRxOsN/barVFpLVpkg7Qm7z6L0OS 2/Ja6yg0cHAS4Zk6CkWe+RdYAUcYV+KKTEdAhW2bBamK7MTWqMBIjRykb20qsoVhDoJM V1w6h/VrJb6LSgjNaxWhld8zqN/+nLwWMevCMIAgr1v/anW25a0/eKxU0YmKJDdj9tbK JT/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yvltRS7tnGgvqE3EEZrsHjqMlDwEFz3Z36QQmOc8VO4=; b=WvuydtSANWZ4CL6qcRDx65filsIPMAbWpiY23d6uzisvb0DNeWFDE/VVBs6XyHmhet mDNh/1LrZP+0/LoD9zs+RzK8D00dNu+MbZ5g5wteCUSrGuQmPkPpEUmub7V84rba/xh7 ohAz0i469r9xnoDqWHMPWah2ytIjbxAG3Hlohzm45Q3RtBbxg3uZlGSfx46YlJeqJaaJ nXmR4E2cg+zzD/7ha/zJlvuRpYlI0dcbCM7ceXe95BYbi7RQvsH1ahaGdgnOyOAHaEvx UZjL1EfjUIZtU/EyysxVbL6MwYvEUBj0TtYBI/adFLQJt9bhrIFFY+LZSjumklKZ1NJ1 6VSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eQFsxBIU; 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 r4si14090655edx.365.2019.11.28.07.05.36; Thu, 28 Nov 2019 07:06:02 -0800 (PST) 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=eQFsxBIU; 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 S1726586AbfK1PEa (ORCPT + 99 others); Thu, 28 Nov 2019 10:04:30 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:47038 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbfK1PEa (ORCPT ); Thu, 28 Nov 2019 10:04:30 -0500 Received: by mail-pg1-f194.google.com with SMTP id k1so4670593pga.13 for ; Thu, 28 Nov 2019 07:04:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yvltRS7tnGgvqE3EEZrsHjqMlDwEFz3Z36QQmOc8VO4=; b=eQFsxBIUarCvPDsVgl8YZBqZBHcPtzLu4gfzHAnzR8E4QidJvqCV/hAjEINfdkg1my t90cdh/1ZrlpqAMzs2gRIpHunaGZEf5G4VmZmdQrRLYQfX7jWi2njqoQ02soPuVvyOnF 6+bHiNX/B38O+FFEULlf9ysVJLkQgFHW0m6hjIe18a3N8pW+5ssqae0zptT1YF8T5U0b 1npZXcbR8+QfbH5i+KEiuJycgRN6GHDazUQIp6CqyO5NDskJyjPJdt0mXfHyYEhaP2CY y1pjnLJVHsLm9LML4zoZS7bSwnkdYIoTeKJarmecrXWW4vtyGD7bRfKJTL3N5LU6OkmV yAcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yvltRS7tnGgvqE3EEZrsHjqMlDwEFz3Z36QQmOc8VO4=; b=T19byT5iOrrRkj785iCQ7kaIUmJohCs30tmRuvu4MWIs5VoiDrwMBd84BNXKXgJxBx nX+dEOvA5G+efygV4703nxRCP+1BlaLJpRl+eQN3QmrUaJVR/w5fUBE6tNFDEY/yD/nR ZxhSNue/zWDLxAE0Y53G80Ppk7v4Pc/lcQZqz1v/aydQl9xe1o9fweuCFbOSYupiu5IY ZXdjPDlTa+R18MSYt4xN4oaDm6Q3ieAc3pRCBi4EqM1KDCqf/FJTXODtK7sRGcvdUoa0 cbwc2Ukti82wWGZKIAq8Mo9Esp0Wm97uCOuT75E3niWQWh8uo9Zk11CMXLfooOFhn4bw cing== X-Gm-Message-State: APjAAAXLkF2htTBt1YqoheMnFHnXpLEZ2KUZk8QfK/KquhqpRj/ZA8Xv y9wJ9qDofti4zzdsgK6x2pU= X-Received: by 2002:a63:584a:: with SMTP id i10mr11118565pgm.29.1574953469489; Thu, 28 Nov 2019 07:04:29 -0800 (PST) Received: from mail.google.com ([139.180.133.10]) by smtp.gmail.com with ESMTPSA id x3sm10979804pjq.10.2019.11.28.07.04.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Nov 2019 07:04:29 -0800 (PST) Date: Thu, 28 Nov 2019 15:04:25 +0000 From: Changbin Du To: Andi Kleen Cc: Changbin Du , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Namhyung Kim , linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 0/2] perf: add support for logging debug messages to file Message-ID: <20191128150424.r6zvv3jwlegjkhcb@mail.google.com> References: <20191126143720.10333-1-changbin.du@gmail.com> <87v9r6e6gw.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87v9r6e6gw.fsf@linux.intel.com> User-Agent: NeoMutt/20180716-508-7c9a6d Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 26, 2019 at 12:19:11PM -0800, Andi Kleen wrote: > Changbin Du writes: > > > When in TUI mode, it is impossible to show all the debug messages to > > console. This make it hard to debug perf issues using debug messages. > > This patch adds support for logging debug messages to file to resolve > > this problem. > > This was already solved in > > commit f78eaef0e0493f6068777a246b9c4d9d5cf2b7aa > Author: Andi Kleen > Date: Fri Nov 21 13:38:00 2014 -0800 > > perf tools: Allow to force redirect pr_debug to stderr. > > When debugging the tui browser I find it useful to redirect the > debug > log into a file. Currently it's always forced to the message > line. > > Add an option to force it to stderr. Then it can be easily > redirected. > > You can do > > perf report --debug stderr 2> file ... > Yes, this is a good alternate approach with existing code. I still think a new option 'file' is not bad. And later maybe we can ouput debug messages to file only while errors ouput to both. > -Andi -- Cheers, Changbin Du