Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758127Ab1CCDox (ORCPT ); Wed, 2 Mar 2011 22:44:53 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:56389 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757891Ab1CCDow convert rfc822-to-8bit (ORCPT ); Wed, 2 Mar 2011 22:44:52 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=W3hSLuyP3kFsnLVP/BjPQi3C3RWsz62vK0KDf7ltNEJtNbAvAvQQO8V07lq/1T9X2+ 1aOM616rbDGl7a7b8UqdAuFjMCLqX3E3bI1EXEczTJpb7ooQjwBwOP8j5Re4o9cNO11E krLNugNBlCnequhTyFS7M7a/R+sT8FHLpm9gc= MIME-Version: 1.0 In-Reply-To: References: <1298082321-8519-1-git-send-email-asharma@fb.com> Date: Wed, 2 Mar 2011 19:44:51 -0800 X-Google-Sender-Auth: zIU4FjNmuHNNH_eqDwzNNODv_1s Message-ID: Subject: Re: [perfmon2] [PATCH] Add libpfm4 support (v2). From: Arun Sharma To: Lin Ming Cc: Arun Sharma , acme@infradead.org, Peter Zijlstra , ming.m.lin@intel.com, Frederic Weisbecker , Mike Galbraith , lkml , Stephane Eranian , Tom Zanussi , Paul Mackerras , Ingo Molnar , Thomas Gleixner , perfmon2-devel@lists.sourceforge.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 924 Lines: 25 On Wed, Mar 2, 2011 at 7:20 PM, Lin Ming wrote: >> +#ifdef LIBPFM4 >> +       printf("\n"); >> +       pfm_for_all_pmus(i) { >> +               int ret; >> +               pfm_pmu_info_t pinfo; >> +               int count; >> +               int k; >> + > > Need to initialize pinfo before passing it to pfm_get_pmu_info > +               memset(&pinfo, 0, sizeof(pinfo)); > >> +               ret = pfm_get_pmu_info(i, &pinfo); You can get by using my next patch which initializes pinfo.size, but zero'ing the entire structure is a better idea (needs to be done for attr too). I'll get this into -v3. -Arun -- 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/