Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753520AbbDBNqO (ORCPT ); Thu, 2 Apr 2015 09:46:14 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:10338 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753164AbbDBNo4 (ORCPT ); Thu, 2 Apr 2015 09:44:56 -0400 From: Yunlong Song To: , , , CC: , Subject: [PATCH 08/10] perf tools: Support using -f to override perf.data file ownership for timechart Date: Thu, 2 Apr 2015 21:47:17 +0800 Message-ID: <1427982439-27388-9-git-send-email-yunlong.song@huawei.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1427982439-27388-1-git-send-email-yunlong.song@huawei.com> References: <1427982439-27388-1-git-send-email-yunlong.song@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.110.52.30] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.551D47D4.00CD,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: cb301823bfe4902f974cded88b14123c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3413 Lines: 102 Enable perf timechart to use perf.data when it is not owned by current user or root. Example: # perf timechart record ls # chown Yunlong.Song:Yunlong.Song perf.data # ls -al perf.data -rw------- 1 Yunlong.Song Yunlong.Song 5471744 Apr 2 15:15 perf.data # id uid=0(root) gid=0(root) groups=0(root),64(pkcs11) Before this patch: # perf timechart File perf.data not owned by current user or root (use -f to override) # perf timechart -f Error: unknown switch `f' usage: perf timechart [] {record} -i, --input input file name -o, --output output file name -w, --width page width --highlight highlight tasks. Pass duration in ns or process name. -P, --power-only output power data only -T, --tasks-only output processes data only -p, --process process selector. Pass a pid or process name. --symfs Look for files with symbols relative to this directory -n, --proc-num min. number of tasks to print -t, --topology sort CPUs according to topology --io-skip-eagain skip EAGAIN errors --io-min-time