Skip to contentSkip to conversation

linux-next: build failure after merge of the perf tree

DISCUSSION Mark Brown 2 participants 7 messages Jan 19 – Jan 26 Linux-next tree

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

After merging the perf tree, today's linux-next build (arm64 perf) failed like this:

Exception processing /tmp/next/perf/pmu-events/arch/arm64/arm/cortex-a510/pmu.json Traceback (most recent call last):
File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 1405, in ftw

    action(parents, item)
    ~~~~~~^^^^^^^^^^^^^^^
  File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 656, in preprocess_one_file
    for event in read_json_events(item.path, topic):
                 ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 464, in read_json_events
    events = json.load(open(path), object_hook=JsonEvent)
  File "/usr/lib/python3.13/json/__init__.py", line 293, in load
    return loads(fp.read(),
        cls=cls, object_hook=object_hook,
        parse_float=parse_float, parse_int=parse_int,
        parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.13/json/__init__.py", line 359, in loads
    return cls(**kw).decode(s)
           ~~~~~~~~~~~~~~~~^^^
  File "/usr/lib/python3.13/json/decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/lib/python3.13/json/decoder.py", line 361, in raw_decode
obj, end = self.scan_once(s, idx)
~~~~~~~~~~~~~~^^^^^^^^
File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 422, in __init__
raise argparse.ArgumentTypeError('Cannot find arch std event:', arch_std)
argparse.ArgumentTypeError: ('Cannot find arch std event:', 'PMU_OVFS')

Caused by commit

a66f6242fbf52 (perf vendor events arm64: Remove uncountable events)

I have used the perf tree from 20260116 instead.

#1 lore raw
Quoted 6 lines · Mark Brown

Hi all,

After merging the perf tree, today's linux-next build (arm64 perf) failed like this:

Exception processing /tmp/next/perf/pmu-events/arch/arm64/arm/cortex-a510/pmu.json

Hi Mark,

Do you have a clean checkout? a66f6242fbf52 removes this file and at the same time removes the definition from common-and-microarch.json. I think you would get this build error if cortex-a510/pmu.json exists as a stale file with that commit applied.

Thanks
James

Quoted 32 lines

Traceback (most recent call last):

   File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 1405, in ftw
     action(parents, item)
     ~~~~~~^^^^^^^^^^^^^^^
   File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 656, in preprocess_one_file
     for event in read_json_events(item.path, topic):
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
   File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 464, in read_json_events
     events = json.load(open(path), object_hook=JsonEvent)
   File "/usr/lib/python3.13/json/__init__.py", line 293, in load
     return loads(fp.read(),
         cls=cls, object_hook=object_hook,
         parse_float=parse_float, parse_int=parse_int,
         parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
   File "/usr/lib/python3.13/json/__init__.py", line 359, in loads
     return cls(**kw).decode(s)
            ~~~~~~~~~~~~~~~~^^^
   File "/usr/lib/python3.13/json/decoder.py", line 345, in decode
     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.13/json/decoder.py", line 361, in raw_decode
     obj, end = self.scan_once(s, idx)
                ~~~~~~~~~~~~~~^^^^^^^^
   File "/tmp/next/build/tools/perf/pmu-events/jevents.py", line 422, in __init__
     raise argparse.ArgumentTypeError('Cannot find arch std event:', arch_std)

argparse.ArgumentTypeError: ('Cannot find arch std event:', 'PMU_OVFS')

Caused by commit

a66f6242fbf52 (perf vendor events arm64: Remove uncountable events)

I have used the perf tree from 20260116 instead.

author maintainer
#2 lore raw
Quoted 11 lines · James Clark
Quoted 4 lines · Mark Brown

After merging the perf tree, today's linux-next build (arm64 perf) failed like this:

Exception processing /tmp/next/perf/pmu-events/arch/arm64/arm/cortex-a510/pmu.json

Do you have a clean checkout? a66f6242fbf52 removes this file and at the same time removes the definition from common-and-microarch.json. I think you would get this build error if cortex-a510/pmu.json exists as a stale file with that commit applied.

No, all the -next builds are done incrementally so the working tree will start with whatever the last commit that got built was. This would also break bisection cases...

#3 lore raw
Quoted 8 lines · Mark Brown
Quoted 6 lines · James Clark
Quoted 4 lines · Mark Brown

After merging the perf tree, today's linux-next build (arm64 perf) failed like this:

Exception processing /tmp/next/perf/pmu-events/arch/arm64/arm/cortex-a510/pmu.json

Quoted 8 lines
Quoted 4 lines

Do you have a clean checkout? a66f6242fbf52 removes this file and at the same time removes the definition from common-and-microarch.json. I think you would get this build error if cortex-a510/pmu.json exists as a stale file with that commit applied.

No, all the -next builds are done incrementally so the working tree will start with whatever the last commit that got built was. This would also break bisection cases...

Oh I see, that's an out of source build path not actually in the repo.

That is a problem then, will take a look. I'm not sure why those files are even copied out of the tree. It would make sense if they're generated, but those ones specifically are not.

Seems like the build will need to be fixed to either handle deleted files or just not copy them in the first place.

author maintainer
#4 lore raw
Quoted 7 lines · James Clark
Quoted 3 lines · Mark Brown

No, all the -next builds are done incrementally so the working tree will start with whatever the last commit that got built was. This would also break bisection cases...

Oh I see, that's an out of source build path not actually in the repo.

Yeah, all the -next builds are out of tree builds (he says grumpily looking at the kselftest coverage he just enabled :/) - the source tree is kept clean.

Quoted 6 lines

That is a problem then, will take a look. I'm not sure why those files are even copied out of the tree. It would make sense if they're generated, but those ones specifically are not.

Seems like the build will need to be fixed to either handle deleted files or just not copy them in the first place.

Great, thanks.

author maintainer
#5 lore raw
In reply to Mark Brown
Quoted 7 lines · Mark Brown

Hi all,

After merging the perf tree, today's linux-next build (arm64 perf) failed like this:

Exception processing /tmp/next/perf/pmu-events/arch/arm64/arm/cortex-a510/pmu.json Traceback (most recent call last):

...

Quoted 5 lines

Caused by commit

a66f6242fbf52 (perf vendor events arm64: Remove uncountable events)

I have used the perf tree from 20260116 instead.

This issue is still present in today's -next.

#6 lore raw
Quoted 11 lines · Mark Brown
Quoted 7 lines · Mark Brown

Hi all,

After merging the perf tree, today's linux-next build (arm64 perf) failed like this:

Exception processing /tmp/next/perf/pmu-events/arch/arm64/arm/cortex-a510/pmu.json Traceback (most recent call last):

...

Quoted 7 lines
Quoted 5 lines

Caused by commit

a66f6242fbf52 (perf vendor events arm64: Remove uncountable events)

I have used the perf tree from 20260116 instead.

This issue is still present in today's -next.

Hi Arnaldo,

Did you see [1]? If it looks ok you should be able to apply it.

[1]: https://lore.kernel.org/linux-perf-users/[email protected]/

Thanks
James