Corey, On Fri, Dec 4, 2009 at 11:16 PM, Corey Ashford <cjash...@linux.vnet.ibm.com> wrote:
> I assume this is supposed to be > .uname = "CORE_SELF",\ > >> .udesc = "This core",\ >> .ucode = 0x40\ >> },\ >> { .uname = "BOTH_CORES",\ > > and > .uname = "CORE_BOTH",\ > >> .udesc = "Both cores",\ >> .ucode = 0xc0\ >> } >> Yes. >> In this particular case, a reasonable default would be >> >> L2_LD:ANY:MESI:CORE_SELF:u=1:k=0:i=0:e=0:c=0 >> >> I think the only reasonable approach would be for the >> tool to iterate over all the attributes and query 'default' >> information. So here, it would return: >> >> M: is_dfl=0 >> E: is_dfl=0 >> S: is_dfl=0 >> I: is_dfl=0 >> MESI: is_dfl=1 value=0xf (unit mask value) >> CORE_BOTH: is_dfl=0 >> CORE_SELF: is_dfl=1 >> u: is_dfl=1 value=1 >> k: is_dfl=0 >> i: is_dfl=0 >> e: is_dfl=0 >> c: is_dfl=0 > > Just so I'm certain I understand what you are saying, if I specify > > L2_LD:MESI:M=0 > > would that be an error (because M=0 conflicts with MESI) ? > I assume you mean M as in Modified, i.e,, from MESI. In this case, you would get an error because MESI are managed as unit masks, not modifiers. You'd get an error because there is no modifier called M. But going back to your example: L2_LD:MESI:M This would be legal because MESI bits can be combined. That would be a stupid combination because you would end up measuring MESI. The library would have to ensure that there is either at least one unit mask set per group (here the group is M, E, S, I) or it would pick the default (here MESI). > I would assume it would be, and we'd have to come up with some way of > detecting these sorts of errors. If it would be legal to specify one group > and then alter it with an individual attribute, would the semantics differ > from specifying them in the opposite order? > > L2_LD:M=0:MESI > Same explanation as above. > In this case I'm saying, I want M=0 but MESI otherwise... > > Assuming this mixing groups and individual attributes is just not allowed, > would the following be an error? > L2_LD:M=0 > > ... where you only specify one of the individual attributes and not the > others... do the others default to something? They have is_dfl set to zero, > but can they still have default values? Or do you start with the default > group, and then allow modification of individual attributes (i.e. L2_LD:M=0 > would be sort of an implicit L2_LD:MESI:M=0) > > Also, there definitely needs to be error checking against specifying two > groups: > > L2_LD:ANY:CORE_BOTH:CORE_SELF > Yes, in this unit mask group at most of mask can be set. This gets me to the next challenge: how to expressed these constraints on the unit masks in the table? Today, on X86, the only constraint we know about is NCOMBO which means you can have at most of unit mask at a time. But here we are looking at something far more complicated with unit mask groups. Maybe we could get by by simply implementing this in the actual code and not in the table. This is how it's done today for MESI and CORE_SELF/CORE_BOTH. The number of events where you have to deal with this is fairly minimal on X86. ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel