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

How to load customized PMI handler #308

Open
bluechen8 opened this issue Jul 11, 2024 · 0 comments
Open

How to load customized PMI handler #308

bluechen8 opened this issue Jul 11, 2024 · 0 comments

Comments

@bluechen8
Copy link

Hi Team,

I want to customize a kernel module that handles the PMI (performance monitor interrupt). Basically, I plan to program the performance counter that will trigger interrupt after X retired intructions and then the kernel module will send a signal to the userspace program so that it can stop at specific position (i.e. instruction X). PS: the program is running inside the gdb.

However, since the arm-pmu driver has already registered the interrupt and I don't know the irq number of the PMI, I fail to load the personal PMI handler module. Meanwhile, there are weird behaviors when I interact with arm-pmu driver by directly programming the PMU with system register access. The PMI mode interrupt make all program crash and jump to user login window, nothing happens on AIC mode and the program that set up the counters hangs on FIQ mode.

I also consider using perf_event_open and set up SIGIO signal handler for sampling mode. But it does not work well.

Any suggestions? Thanks!

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

No branches or pull requests

1 participant