HenrikBengtsson / x86-64-level

x86-64-level - Get the x86-64 Microarchitecture Level on the Current Machine
https://github.com/HenrikBengtsson/x86-64-level
95 stars 16 forks source link

Output something on `--verbose` when maximum level reached. #13

Open mjsir911 opened 7 months ago

mjsir911 commented 7 months ago

Hi,

I got a bit confused when running --verbose because I wasn't seeing any additional output. It turns out it only displays extra stuff if a cpu version limit has been reached, while my laptop satisfies maximum level of 4.

It would be useful if something was outputted, considering the limited output looks something like this:

$ x86-64-level --verbose
Identified x86-64-v3, because x86-64-v4 requires 'avx512f', which
is not supported by this CPU [Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz]
3

Maybe this?:

$ x86-64-level --verbose
Identified x86-64-v4 for this CPU [11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz]
4
HenrikBengtsson commented 6 months ago

Maybe this?:

$ x86-64-level --verbose
Identified x86-64-v4 for this CPU [11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz]
4

To future-proof it, it should probably say:

$ x86-64-level --verbose
Identified x86-64-v4(*) for this CPU [11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz]
(*) The latest version known by this tool
4

suggesting that there might exist an 'x86-64-v5' level, but the x86-64-level tool only knows about v0-v4.