Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753691AbbHUIzH (ORCPT ); Fri, 21 Aug 2015 04:55:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53495 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbbHUIzF (ORCPT ); Fri, 21 Aug 2015 04:55:05 -0400 Date: Fri, 21 Aug 2015 10:55:00 +0200 From: Jiri Olsa To: Kan Liang Cc: acme@kernel.org, a.p.zijlstra@chello.nl, luto@kernel.org, mingo@redhat.com, eranian@google.com, ak@linux.intel.com, mark.rutland@arm.com, adrian.hunter@intel.com, jolsa@kernel.org, namhyung@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V4 1/7] perf,tools: introduce generic FEAT for CPU attributes Message-ID: <20150821085500.GA23142@krava.brq.redhat.com> References: <1439907401-37226-1-git-send-email-kan.liang@intel.com> <1439907401-37226-2-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439907401-37226-2-git-send-email-kan.liang@intel.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 Content-Length: 950 Lines: 34 On Tue, Aug 18, 2015 at 10:16:35AM -0400, Kan Liang wrote: SNIP > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > index 179b2bd..0a06fb8 100644 > --- a/tools/perf/util/header.c > +++ b/tools/perf/util/header.c > @@ -862,6 +862,23 @@ write_it: > return do_write_string(fd, buffer); > } > > +#define MAX_FREQ_TAG_STR "max_freq" > + > +static int write_cpu_attributes(int fd, struct perf_header *h __maybe_unused, > + struct perf_evlist *evlist __maybe_unused) > +{ > + u64 freq; > + int ret; > + > + freq = get_cpu_max_freq(); > + > + ret = do_write_string(fd, MAX_FREQ_TAG_STR); > + if (ret) > + return ret; why not store just the tag number? PERF_HEADER_CPU_MAX_FREQ jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/