[prev in list] [next in list] [prev in thread] [next in thread] 

List:       oprofile-list
Subject:    Re: [patch 0/7] Oprofile AMD IBS support
From:       "Jason Yeh" <jason.yeh () amd ! com>
Date:       2008-01-30 15:54:35
Message-ID: 47A09DBB.2080701 () amd ! com
[Download RAW message or body]

John Levon wrote:
> A whole bunch of this new code doesn't meet the coding standard. I know
> it's tedious but it really does need cleaning up before integration.

Sorry about that. I attached that tar.gz of the patches. I will work on the coding \
standard in the next version of the patch. Is "check_style.py" still being used to \
verify the coding standard?

> 
> > Three new options are added to opcontrol script. "--ibs-fetch=#count"
> > and "ibs-op=#count" enabl and specify the max count for IBS fetch and
> > op repectively. "--ibs-fetch=0" and --ibs-op=0" disable IBS.
> > "--no-event" is added to clear the current event selection in daemonrc.
> 
> We already have --event=none, why doesn't this do it?

I was not aware of the switch. I will remove the redundant switch.

> 
> Why are we using this form instead of using --event somehow? I'd like to
> see a clearer explanation of this. CPU-specific command lines make me
> nervous.

The main reason is that IBS has no equivalent of kernel and user bit, no unit mask. I \
felt that using separate switched made it more clear on using IBS. If "--event" is to \
be used, which format of the switch would be preferred: 

1. Something similar to "--event=ibs_op:count" and "--event=ibs_fetch:count" and \
modify the parsing code.

2. Continue using the current format, and the kernel and user bit, unit mask must are \
ignored for IBS events. 

> 
> > Two directories, ibs_fetch and ibs_uops are added to the oprofilefs
> > allowing the control of MSRs through oprofile.ko module.
> 
> Can you put your changes to this up somewhere too, so we can see what
> we're interfacing with?

I also included the kernel patch in the .tar.gz file.

> 
> > To differentiate IBS events from EBS events and to accommodate the fact 
> > that IBS events are not uniform in length when read from buffer. Two 
> > escape codes "IBS_FETCH_SAMPLE" and "IBS_OP_SAMPLE" and their handlers 
> > are added.
> 
> Why is fetch and op so different they deserve different primary escape
> codes? Wouldn't it be nicer to have a "MULTI" escape code, and then a
> sub-code for the AMD-specific bits?

This can be done. I will add it to the next version of the patch.

> 
> How are these EBS events then named? I'd like to see a spec as well as
> the code (you'll need to document it anyway...)

The IBS events are named either IBS_FETCH_*** or IBS_OP_***. The events are derived \
from MSRs and not part of the spec. I will create a separate  document on how the IBS \
events are derived.

> 
> Can we see example input and output to help us understand the basics (I
> read the PDF some months ago, but I've forgotten most of it)

When IBS fetch sampling is collected, any of the following derived fetch events could \
be generate. The same applies to IBS op. Due to the number of the derived events, it \
will be impractical to try to view them at the same time. Here is an example of \
opreport output with event IBS_FETCH_4K_PAGE:

Sahara64:~ # opreport  --merge=all event:IBS_FETCH_4K_PAGE
CPU: AMD64 family10h, speed 800 MHz (estimated)
Counted IBS_FETCH_4K_PAGE events (IBS 4K page translation) with a unit mask of 0x00 \
(No unit mask) count 500000 IBS_FETCH_4K_P...|
  samples|      %|
------------------
      247 46.1682 no-vmlinux
      219 40.9346 Xvnc
       30  5.6075 libc-2.4.so
       14  2.6168 oprofiled
        5  0.9346 libcairo.so.2.2.3
        4  0.7477 libgdk-x11-2.0.so.0.800.11
        3  0.5607 bash
        2  0.3738 ld-2.4.so
        2  0.3738 libpthread-2.4.so
        2  0.3738 libglib-2.0.so.0.800.6
        2  0.3738 libdbus-1.so.2.0.0
        1  0.1869 metacity
        1  0.1869 libpango-1.0.so.0.1001.1
        1  0.1869 gvim
        1  0.1869 libXrender.so.1.2.2
        1  0.1869 libxpcom_core.so

The sample names are:

IBS_FETCH_SAMPLES
IBS_FETCH_KILLED
IBS_FETCH_ATTEMPTED
IBS_FETCH_COMPLETED
IBS_FETCH_ABORTED
IBS_FETCH_ITLB_HITS
IBS_FETCH_L1_ITLB_MISSES_L2_ITLB_HITS
IBS_FETCH_L1_ITLB_MISSES_L2_ITLB_MISSES
IBS_FETCH_ICACHE_MISSES
IBS_FETCH_ICACHE_HITS
IBS_FETCH_4K_PAGE
IBS_FETCH_2M_PAGE
IBS_FETCH_LATENCY

IBS_OP_ALL
IBS_OP_TAG_TO_RETIRE
IBS_OP_COMP_TO_RET
IBS_OP_BRANCH_RETIRED
IBS_OP_MISPREDICTED_BRANCH
IBS_OP_TAKEN_BRANCH
IBS_OP_MISPREDICTED_BRANCH_TAKEN
IBS_OP_RETURNS
IBS_OP_MISPREDICTED_RETURNS
IBS_OP_RESYNC
IBS_OP_ALL_LOAD_STORE
IBS_OP_LOAD
IBS_OP_STORE
IBS_OP_L1_DTLB_HITS
IBS_OP_L1_DTLB_MISS_L2_DTLB_HIT
IBS_OP_L1_L2_DTLB_MISS
IBS_OP_DATA_CACHE_MISS
IBS_OP_DATA_HITS
IBS_OP_MISALIGNED_DATA_ACC
IBS_OP_BANK_CONF_LOAD
IBS_OP_BANK_CONF_STORE
IBS_OP_FORWARD
IBS_OP_CANCELLED
IBS_OP_DCUC_MEM_ACC
IBS_OP_DCWC_MEM_ACC
IBS_OP_LOCKED
IBS_OP_MAB_HIT
IBS_OP_L1_DTLB_4K
IBS_OP_L1_DTLB_2M
IBS_OP_L1_DTLB_1G
IBS_OP_L2_DTLB_4K
IBS_OP_L2_DTLB_2M
IBS_OP_DC_LOAD_LAT
IBS_OP_NB_LOCAL_ONLY
IBS_OP_NB_REMOTE_ONLY
IBS_OP_NB_LOCAL_L3
IBS_OP_NB_LOCAL_CACHE
IBS_OP_NB_REMOTE_CACHE
IBS_OP_NB_LOCAL_DRAM
IBS_OP_NB_REMOTE_DRAM
IBS_OP_NB_LOCAL_OTHER
IBS_OP_NB_REMOTE_OTHER
IBS_OP_NB_CACHE_MODIFIED
IBS_OP_NB_CACHE_OWNED
IBS_OP_NB_LOCAL_CACHE_LAT
IBS_OP_NB_REMOTE_CACHE_LAT

Please let me if you have more questions.
Thanks.

Jason


["ibs_patch.tar.gz" (application/x-gzip)]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic