Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755385AbbGZQcR (ORCPT ); Sun, 26 Jul 2015 12:32:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58520 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755284AbbGZQcO (ORCPT ); Sun, 26 Jul 2015 12:32:14 -0400 Date: Sun, 26 Jul 2015 18:32:10 +0200 From: Jiri Olsa To: kan.liang@intel.com Cc: a.p.zijlstra@chello.nl, acme@kernel.org, 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 V2 1/6] perf,tools: save cpu max freq in perf header Message-ID: <20150726163210.GG24646@krava.brq.redhat.com> References: <1437745712-16649-1-git-send-email-kan.liang@intel.com> <1437745712-16649-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: <1437745712-16649-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: 1157 Lines: 39 On Fri, Jul 24, 2015 at 09:48:27AM -0400, kan.liang@intel.com wrote: SNIP > diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h > index 0af9cec..6784677 100644 > --- a/tools/perf/util/cpumap.h > +++ b/tools/perf/util/cpumap.h > @@ -58,6 +58,7 @@ int max_node_num; > int *cpunode_map; > > int cpu__setup_cpunode_map(void); > +unsigned int get_cpu_max_freq(void); > > static inline int cpu__max_node(void) > { > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > index 03ace57..287a488 100644 > --- a/tools/perf/util/header.c > +++ b/tools/perf/util/header.c > @@ -862,6 +862,16 @@ write_it: > return do_write_string(fd, buffer); > } > > +static int write_cpu_max_freq(int fd, struct perf_header *h __maybe_unused, > + struct perf_evlist *evlist __maybe_unused) > +{ > + u32 freq; > + > + freq = get_cpu_max_freq() / 1000; why dont you store it as u64 ? 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/