From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753971AbeCFRre (ORCPT ); Tue, 6 Mar 2018 12:47:34 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:36561 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbeCFRrb (ORCPT ); Tue, 6 Mar 2018 12:47:31 -0500 X-Google-Smtp-Source: AG47ELs88lmkVabr4zoxG6w6czBwV3XAzj0TZXpS2w0K7gKmf159oAs0cOjVXkM5tQK2bBYtksAXMUPsV4azZqfnElM= MIME-Version: 1.0 In-Reply-To: <20180306170011.GD25017@tassilo.jf.intel.com> References: <20180306064353.31930-1-xiyou.wangcong@gmail.com> <20180306170011.GD25017@tassilo.jf.intel.com> From: Cong Wang Date: Tue, 6 Mar 2018 09:47:09 -0800 Message-ID: Subject: Re: [PATCH] perf stat: fix cvs output format To: Andi Kleen Cc: LKML , Arnaldo Carvalho de Melo , Jiri Olsa , Ilya Pronin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 6, 2018 at 9:00 AM, Andi Kleen wrote: > On Mon, Mar 05, 2018 at 10:43:53PM -0800, Cong Wang wrote: >> From: Ilya Pronin >> >> When printing stats in CSV mode, perf stat appends extra CSV >> separators when counter is not supported: >> >> ,,L1-dcache-store-misses,mesos/bd442f34-2b4a-47df-b966-9b281f9f56fc,0,100.00,,,, >> >> which causes a failure of parsing fields. The numbers of separators > > Causes failure in what? Failed to know how many fields in that line, clearly there are less separators when it is supported. > >> is fixed for each line, no matter supported or not supported. > > I don't think they're extra fields, there are cases where they can be filled out > for variance, metricvalue, unit. And other code in perf too uses empty > fields when something is not available. Are you saying there should be more fields when it is not supported? Here is the output from your own commit: 423470,,stalled-cycles-frontend,509102,100.00,65.69,frontend cycles idle ,,stalled-cycles-backend,0,100.00,,,, so line 1 has 7 fields, line 2 has 9 fields, and this is expected?