From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754855AbbCMLVb (ORCPT ); Fri, 13 Mar 2015 07:21:31 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:38563 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750996AbbCMLVa (ORCPT ); Fri, 13 Mar 2015 07:21:30 -0400 Date: Fri, 13 Mar 2015 20:20:46 +0900 From: Namhyung Kim To: Wang Nan Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, lizefan@huawei.com, pi3orama@163.com Subject: Re: [PATCH] perf: fix a segfault problem. Message-ID: <20150313112046.GA28773@danjae.skbroadband> References: <1426236092-197137-1-git-send-email-wangnan0@huawei.com> <20150313094615.GC10836@danjae.skbroadband> <5502B6E6.2050204@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5502B6E6.2050204@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 13, 2015 at 06:07:34PM +0800, Wang Nan wrote: > On 2015/3/13 17:46, Namhyung Kim wrote: > > On Fri, Mar 13, 2015 at 08:41:32AM +0000, Wang Nan wrote: > >> Without this patch, perf report cause segfault if pass "" as '-t': > >> > >> $ perf report -t "" > >> > >> # To display the perf.data header info, please use --header/--header-only options. > >> # > >> # Samples: 37 of event 'syscalls:sys_enter_write' > >> # Event count (approx.): 37 > >> # > >> # Children SelfCommand Shared Object Symbol > >> Segmentation fault > >> > >> This patch avoid the segfault by checking empty string for > >> 'symbol_conf.field_sep'. > > > > What about resetting it to NULL if empty string was given? > > > > In fact I'm not very clear why we need such 'symbol_conf.field_sep', so I'm > not sure whether '-t ""' is totally meanless or not. > > -t option replaces a group of character with '.' and appends them after a field. > With -t 'abc' I get something like: > > # > # OverheadabcCommand abcShared Object abcSymbol > 100.00%abcb.beltr.ceabc[kernel.k.llsyms]abc[k] 0xffffffff810118f0 > ... > > Hard to read... > > I read docs and your commit messages, but still not understand the option. Could you > please explain the goal and usage of that option again? Well, I'm not the person who wrote the doc and introduced this option. ;-) Anyway AFAIK it's to generate a CSV file so usual value would be ','. To reduce possible confusion due to the separation character in the original output, it replaces the character during the generation. Thanks, Namhyung