Giter Site home page Giter Site logo

Comments (4)

moep0 avatar moep0 commented on July 16, 2024 1

Hello, when I'm running uarch-bench in my virtual machine (ubuntu 20.04) with the i7-10700 CPU, this problem occurred.
I am wondering where I can get the events file or how to solve it.
Thank you very much!

Hi meop0,

Does the VM have network access?

Most VMs don't pass through performance counters, so even if you resolve this problem, I wouldn't expect it to work with --timer=perf. You can see if your VM supports perf events by installing the perf tool and trying something like: perf stat sleep 1s. If that shows cycles as one of the outputs then I guess it is working!

If you want to see what event file uarch-bench is trying to look for, you can try this:

strace ./uarch-bench --timer=perf --test-name=foo 2>&1  | grep 'pmu-events'

That said, since I don't think perf events will work in your VM, you can just use the default --timer=clock instead.

It turns out that pmu-tools/event_download.py didn't work properly and thus files were missing. It can be fixed by just sudo make again. (I don't know why I missed the error message.)

Besides, VMware can virtualize the CPU counters and perf works, though I don't know if there is any difference. Maybe I will write a blog about it later.
However, the PFC submodule seems to have some problems with VMware that I can't load the kernel module and dmesg outputs that pfc: ERROR: Processor does not have Perfmon and Debug Capability!. It's super weird.

Anyway, uarch is an awesome benchmark. Thank you so much for open source.

from uarch-bench.

moep0 avatar moep0 commented on July 16, 2024

Hello, when I'm running uarch-bench in my virtual machine (ubuntu 20.04) with the i7-10700 CPU, this problem occurred.
I am wondering where I can get the events file or how to solve it.
Thank you very much!

from uarch-bench.

travisdowns avatar travisdowns commented on July 16, 2024

Hello, when I'm running uarch-bench in my virtual machine (ubuntu 20.04) with the i7-10700 CPU, this problem occurred.
I am wondering where I can get the events file or how to solve it.
Thank you very much!

Hi meop0,

Does the VM have network access?

Most VMs don't pass through performance counters, so even if you resolve this problem, I wouldn't expect it to work with --timer=perf. You can see if your VM supports perf events by installing the perf tool and trying something like: perf stat sleep 1s. If that shows cycles as one of the outputs then I guess it is working!

If you want to see what event file uarch-bench is trying to look for, you can try this:

strace ./uarch-bench --timer=perf --test-name=foo 2>&1  | grep 'pmu-events'

That said, since I don't think perf events will work in your VM, you can just use the default --timer=clock instead.

from uarch-bench.

travisdowns avatar travisdowns commented on July 16, 2024

It turns out that pmu-tools/event_download.py didn't work properly and thus files were missing. It can be fixed by just sudo make again. (I don't know why I missed the error message.)

Ah OK. So does --timer=perf work after the events are downloaded? BTW, you shouldn't need sudo to run make for this project, although I suppose you can if you want (I haven't tested that scenario, and I assume it might do weird things like write the event files to the $HOME directory for root user). I guess if you are running uarch-bench itself using sudo then you'd want to run make under sudo too so the files end in the right place.

In general I'm not really happy with this whole event file downloading thing: it's inherited from the jevents library I used. I'd prefer instead to have the files checked in or compiled directly into the binary even though it would mean that I have to periodically update them. I'll need to do something like that to support AMD anyway.

Besides, VMware can virtualize the CPU counters and perf works

Ah nice. Despite what I said earlier, several VMs may also allow counter access, but it may not be on by default or something. I suppose the hypervisor needs to virtualize this by switching around the counter configuration, saving values and so on, every time the guest changes. To do it right you need a pretty comprehensive view of all the possible MSRs and configs, and it has to be kept to date, so it doesn't seem trivial.

I can't load the kernel module and dmesg outputs that pfc: ERROR: Processor does not have Perfmon and Debug Capability!. It's super weird.

Huh, that error message occurs when a couple of perf related cpuid checks fail: one for having perf monitoring at all, and one for full-width rights. I guess VMWare is not reporting one of those two things. In any case, I don't think pfc offers much above --timer=perf here and the latter has a lot that pfc doesn't have. PFC is kind of obsolete in that sense: it's what I used first and I keep it in "just because", but I rarely use it (could be useful on some old kernels with poor perf_events support or as a way to double-check perf).

from uarch-bench.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.