Re: [perfmon2] [PATCH] Add libpfm4 support (v2).

From: Arun Sharma
Date: Wed Mar 02 2011 - 22:44:56 EST


On Wed, Mar 2, 2011 at 7:20 PM, Lin Ming <minggr@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/