#157 mips events have incorrect id numbers

closed-fixed
Philippe Elie
None
5
2008-07-17
2007-05-11
Jim Quinlan
No

Many of the mips "events" files have event id numbers that are given in decimal but are parsed by Oprofile as hex numbers. Naturally, this does not affect events with id numbers less than 10. I have verified that this is happening by actually reading the value of the mips control register only to discover that the number is incorrect. Also, a grep of the "events" files of all processors indicates that only the mips "events" files do not use hex event ids.

Discussion

  • John Levon
    John Levon
    2007-05-20

    Logged In: YES
    user_id=53034
    Originator: NO

    Yep.

     
  • John Levon
    John Levon
    2007-05-20

    • assigned_to: nobody --> movement
     
  • Philippe Elie
    Philippe Elie
    2007-10-19

    • status: open --> open-fixed
     
  • Philippe Elie
    Philippe Elie
    2007-10-19

    Logged In: YES
    user_id=318973
    Originator: NO

    Fixed in cvs, I commented out a bunch of event in mips/34K, these events
    get the same event number/unit mask/counter nr but different meaning, that can't work. I'll added that to the TODO file

     
  • Jim Quinlan
    Jim Quinlan
    2007-10-19

    Logged In: YES
    user_id=1790121
    Originator: YES

    Folks -- I apologize for not having the bandwidth to attend to this myself. However, the last I looked at this, all of the other architectures had preceding '0x' for these numbers. The code that parses the number could be easily changed to look for a preceding '0x' or '0X' and parse as hex, otherwise decimal. Then, all the mips numbers would be valid as they are. -- JimQ

     
  • Philippe Elie
    Philippe Elie
    2007-10-19

    Logged In: YES
    user_id=318973
    Originator: NO

    Yes, I was ready to change the code to allow both hexa/decimal form but I think it's very error prone to allow them
    event:0x11 ..
    event:12 ... <--- hu, is it an error or is it right ?
    event:0x13 ..

    so I corrected all mips event number to put them in hexa and modified the code that parse event to complain loudly if it encounter a number not prefixed by 0x or 0X in an events files, now '$ make check' fails if someone try to use decimal for event number or default mask.

    And yes, it was really boring to do all the change in mips/* files ;)

     
  • Philippe Elie
    Philippe Elie
    2007-10-25

    • assigned_to: movement --> phil_e
     
    • status: open-fixed --> closed-fixed