From owner-freebsd-current@FreeBSD.ORG Wed Oct 17 22:57:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D62B83BA for ; Wed, 17 Oct 2012 22:57:45 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 546AD8FC08 for ; Wed, 17 Oct 2012 22:57:44 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so3705049bkc.13 for ; Wed, 17 Oct 2012 15:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Uxf9uZOZDcqbxoYBfDxtj7AtTPPKNrOaH/+vQc4fWcg=; b=kto45l7InNXjg4lbRHWjdVPLL+win0FObaO08QsTPz+8/iOu/EPK9MDsZXrn3fE42c gbxYSg8g4vfYpEsVsAWTKs1eZ5Jx6LpqHrf4HMGReb/k5QRvS0wrkVUeDYH7TRameGsk pUvlBnTDn4aTBW3/7c6DUlZbVFdzBgeS2ZCR8MEdezB+X8M5Kk8FK2fF2jPwSUodJjm2 Zn5nAIYuXEmPndB838hPgmOMf7z8eSeuvE8MHcbNHrNmttKX8koN+AuXZhG9DNxpyyLG 1l2x4QowUbmGW9VeZrxXDdL+mVuyyJt0kFRQC4RmrArj3oCH/5pnjJq0oXLxUkkUA+Md MCSQ== MIME-Version: 1.0 Received: by 10.204.128.201 with SMTP id l9mr5574255bks.66.1350514663883; Wed, 17 Oct 2012 15:57:43 -0700 (PDT) Received: by 10.205.36.136 with HTTP; Wed, 17 Oct 2012 15:57:43 -0700 (PDT) In-Reply-To: References: <1349390777.5234.9.camel@powernoodle.corp.yahoo.com> Date: Wed, 17 Oct 2012 15:57:43 -0700 Message-ID: Subject: Re: [CFT]hwpmc update for sandybridge-e From: hiren panchasara To: Jim Harris Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Davide Italiano , freebsd-current , Fabien Thomas X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 22:57:45 -0000 On Wed, Oct 17, 2012 at 11:41 AM, Jim Harris wrote: > On Mon, Oct 15, 2012 at 5:49 PM, hiren panchasara > wrote: > > > > > Thanks Fabien for getting back quickly. As I am not clear about uncore > > support, I've removed it entirely as you suggested. I've tried to > > incorporate other comments too. > > > > New set of diffs, pmccontrol and pmctest.py results are here: > > > > http://www.strugglingcoder.info/patches/hwpmc_sbx_2.txt > > http://www.strugglingcoder.info/patches/pmccontrol_2.txt > > http://www.strugglingcoder.info/patches/pmctestpy_2.txt > > > > I now have following event counters failing from pmctest.py script: > > > > CYCLE_ACTIVITY.CYCLES_L2_PENDING > > BACLEARS.ANY > > L2_TRANS.DEMAND_DATA_RD > > L2_TRANS.RF0 > > SQ_MISC.SPLIT_LOCK > > Hi Hiren, > > With your patch, I see different event counters failing on my SNB Xeon > system: > > CYCLE_ACTIVITY.CYCLES_L2_PENDING - this is due to missing IAP_F_FM > which Fabien already pointed out. There are 5 total that need this > added - this one is the only one that fails from the pmctest.py script > because it's the only one with bit 0 set (IAP_M_CORE) in its flags > which causes a hard pmc_allocation failure. > MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM - this is due to adding this > event to the SNB Xeon event list in the header file, but IAP_F_SBX is > missing from the associated IAPDESCR for D3H_01H in hwpmc_core.c. > Thanks for the pointers Jim! It seems that everything works now with: http://www.strugglingcoder.info/patches/hwpmc_sbx_3.txt http://www.strugglingcoder.info/patches/pmccontrol_3.txt http://www.strugglingcoder.info/patches/pmctestpy_3.txt As it can be seen, I do not see any errors with the test script. I've also tried to take care of the sorting issues Fabien mentioned. Can you please give this a whirl? > > It's not clear to me why you are seeing failures on those other > events. Maybe make sure libpmc/pmcstat/pmccontrol/hwpmc are all in > sync? > I have a few questions regarding this. For my testing I am using hwpmc as a module. Problem is that any change to pmc_events.h is not reflected when I do: 1) rebuild /sys/modules/hwpmc - unload/load new module 2) rebuild /lib/libpmc/ 3) rebuild /usr.sbin/pmccontrol and pmcstat I have to do buildworld for changes in pmc_events.h to take effect. (which kind of explains my delayed responses :D ) I know I am missing something here and there should be a better way to do this. Any other changes (other than pmc_events.h) can be tested with above 3 steps. > Thanks for working on this! > Entirely my pleasure :-) Thanks, Hiren