Re: [RFC PATCH v3 0/3] x86/perf/amd: AMD PMC counters and NMI latency

From: Vince Weaver
Date: Wed Apr 03 2019 - 10:16:41 EST


On Wed, 3 Apr 2019, Cyrill Gorcunov wrote:

> > Shame on Intel though for not providing perf JSON files for the
> > Pentium 4 event names.
>
> Mind to point me where json events should lay, I could try to convert
> names.

I was mostly joking about that. But the event lists are in the kernel
tree in
tools/perf/pmu-events/arch/x86/
I don't think anything older than Nehalem is included.

After letting the fuzzer run a bit longer I did manage to get it
to hard-lock with no messages in the log, though eventually while I was
fiddling with alt-sysrq over serial port did get this to trigger.
Though if I'm going to start reporting p4 crashes I should start a
separate thread.

[ 2352.198361] watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [perf_fuzzer:27005]
[ 2352.257304] CPU: 1 PID: 27005 Comm: perf_fuzzer Tainted: G W 5.1.0-rc3+ #6
[ 2352.265458] Hardware name: LENOVO 88088NU/LENOVO, BIOS 2JKT37AUS 07/12/2007
[ 2352.272407] RIP: 0010:smp_call_function_single+0xc9/0xf0
[ 2352.277700] Code: 8b 4c 24 38 65 48 33 0c 25 28 00 00 00 75 34 c9 c3 48 89 d1 48 89 f2 48 89 e6 e8 a2 fe ff ff 8b 54 24 18 83 e2 01 74 0b f3 90 <8b> 54 24 18 83 e2 01 75 f5 eb ca 8b 05 06 c4 45 01 85 c0 75 88 0f
[ 2352.296415] RSP: 0018:ffffc90004d0fb80 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13
[ 2352.303961] RAX: 0000000000000000 RBX: ffff888039962500 RCX: ffff88803e520d80
[ 2352.311071] RDX: 0000000000000001 RSI: ffffc90004d0fb80 RDI: ffffc90004d0fb80
[ 2352.318180] RBP: ffffc90004d0fbc0 R08: 0000000000000000 R09: 0000000000000000
[ 2352.325291] R10: ffff888036cc8010 R11: ffff888039978e98 R12: ffffffff8115ec70
[ 2352.332412] R13: 0000000000000001 R14: ffff88803aa15108 R15: ffff88803d5fdb70
[ 2352.339524] FS: 0000000000000000(0000) GS:ffff88803e500000(0000) knlGS:0000000000000000
[ 2352.347587] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2352.353313] CR2: 00007f9d2e56d3b4 CR3: 000000000200e000 CR4: 00000000000006e0
[ 2352.360428] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2352.367540] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
[ 2352.374649] Call Trace:
[ 2352.377104] ? perf_cgroup_attach+0x70/0x70
[ 2352.381276] ? slab_destroy+0xa5/0x120
[ 2352.385016] ? perf_cgroup_attach+0x70/0x70
[ 2352.389186] task_function_call+0x49/0x80
[ 2352.393186] ? bpf_jit_compile+0x30/0x30
[ 2352.397095] event_function_call+0x85/0x100
[ 2352.401265] ? perf_swevent_hrtimer+0x150/0x150
[ 2352.405781] perf_remove_from_context+0x20/0x60
[ 2352.410295] perf_event_release_kernel+0x75/0x2e0
[ 2352.414983] perf_release+0xc/0x10
[ 2352.418373] __fput+0xaf/0x1f0
[ 2352.421425] task_work_run+0x7e/0xa0
[ 2352.424990] do_exit+0x2c6/0xb40
[ 2352.428213] ? event_function_local.constprop.132+0xe0/0xe0
[ 2352.433767] ? visit_groups_merge+0xcd/0x180
[ 2352.438027] do_group_exit+0x3a/0xa0
[ 2352.441598] get_signal+0x123/0x6c0
[ 2352.445080] ? __perf_event_task_sched_in+0xed/0x1a0
[ 2352.450030] do_signal+0x30/0x6a0
[ 2352.453334] ? finish_task_switch+0x10a/0x290
[ 2352.457685] ? __schedule+0x207/0x800
[ 2352.461336] exit_to_usermode_loop+0x5d/0xc0
[ 2352.465593] prepare_exit_to_usermode+0x53/0x80
[ 2352.470110] retint_user+0x8/0x8