Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: create_perf_json: Support 'FIXED' event codes #118

Closed

Conversation

edwarddavidbaker
Copy link
Contributor

This pull request unsets EventCode for FIXED events. Previously for fixed events the EventCode was 0x00. The get() helper used to process JSON attributes drops 0x00 (returns None). Here we add an extra check to also set event_code to None if EventCode is FIXED.

Example FIXED event:

        {
          "EventCode": "FIXED",
          "UMask": "0x01",
          "EventName": "INST_RETIRED.ANY",
          "Counter": "Fixed counter 0",
          "CounterHTOff": "Fixed counter 0",
          <snip>
          "Offcore": "0",
          "Deprecated": "0"
        }

This commit unsets EventCode for FIXED events. Previously for fixed
events the EventCode was 0x00. The get() helper used to process JSON
attributes drops 0x00 (returns None). Here we add an extra check to
also set event_code to None if EventCode is FIXED.

Example FIXED event:
    {
      "EventCode": "FIXED",
      "UMask": "0x01",
      "EventName": "INST_RETIRED.ANY",
      "Counter": "Fixed counter 0",
      "CounterHTOff": "Fixed counter 0",
      <snip>
      "Offcore": "0",
      "Deprecated": "0"
    }
@edwarddavidbaker edwarddavidbaker changed the title create_perf_json: Support 'FIXED' event codes WIP: create_perf_json: Support 'FIXED' event codes Nov 1, 2023
@kshiprab
Copy link
Contributor

Things to consider: We need to have consistent solution to indicate if counter is FIXED or FREERUN or Programmable.
Currently for SNR for IIO unit we have added Countertype column which indicates it is FREERUN counter. For Fixed counter is there any reason we cannot use CounterType column? In your above example we have more than one attribute indicating its Fixed counter.
EventCode and Counter and CounterHTOff attributes. Tools can use different fields for consumption. We need to be consistent for data publication and for tools consumption.

@edwarddavidbaker
Copy link
Contributor Author

Abandoning example WIP pull request.

@edwarddavidbaker edwarddavidbaker deleted the fixed-event-codes branch May 7, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants