Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755652AbcCaOtx (ORCPT ); Thu, 31 Mar 2016 10:49:53 -0400 Received: from mail.kernel.org ([198.145.29.136]:59945 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756334AbcCaOtw (ORCPT ); Thu, 31 Mar 2016 10:49:52 -0400 Date: Thu, 31 Mar 2016 11:49:48 -0300 From: Arnaldo Carvalho de Melo To: kan.liang@intel.com Cc: jolsa@redhat.com, ak@linux.intel.com, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] perf tools: fix format max value calculation Message-ID: <20160331144948.GC27708@kernel.org> References: <1459365375-14285-1-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459365375-14285-1-git-send-email-kan.liang@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 687 Lines: 18 Em Wed, Mar 30, 2016 at 12:16:15PM -0700, kan.liang@intel.com escreveu: > From: Kan Liang > > Currently the max value of format is calculated by the bits number. It > relies on the continuity of the format. > However, uncore event format is not continuous. E.g. uncore qpi event > format can be 0-7,21. > If bit 21 is set, there is parsing issues as below. > perf stat -a -e uncore_qpi_0/event=0x200002,umask=0x8/ > event syntax error: '..pi_0/event=0x200002,umask=0x8/' > \___ value too big for format, maximum > is 511 > > This patch return the real max value by setting all possible bit to 1. Looks good, applied. - Arnaldo