lkml.org 
[lkml]   [2018]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 2/5] perf jevents: add support for arch recommended events
> Can you describe how you autogenerate the JSONs? Do you have some internal
> proprietary HW file format describing events, with files supplied from HW
> designer, which you can just translate into a JSON? Would the files support
> deferencing events to improve scalability?

For Intel JSON is an official format, which is maintained for each CPU.
It is automatically generated from an internal database
https://download.01.org/perfmon/

I have some python scripts to convert these Intel JSONs into the perf
format (which has some additional headers, and is split into
different categories, and add metrics).

They have some Intel specifics, so may not be useful for you.

There's no support for dereference, each CPU gets its own unique file.

But you could do the a merge simply with the attached script which merges
two JSON files.

-Andi
#!/usr/bin/python
# merge json event files
# merge-json file1.json file2... > merged.json
import sys
import json

all = []

for fn in sys.argv[1:]:
jf = json.load(open(fn))
for n in jf:
all.append(n)

print json.dumps(all, sort_keys=True, indent=4, separators=(',', ': '))
\
 
 \ /
  Last update: 2018-01-02 18:49    [W:0.061 / U:0.680 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site