RE: How to use bts recording?
"Metzger, Markus T via Gdb" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <DM8PR11MB5749FBF8A35A9719B42F3AC4DE209@DM8PR11MB5749.namprd11.prod.outlook.com> |
Hello Simon, >PT has the downside of GDB having to be configured for that - which I >guess isn't common in distro versions - and somehow a manual build n the >4.x kernel where libipt was available also did not pick it up (will try >to force it with a GDB 11.2 build soon, thanks for pointing out the >configure flags; I've looked in the tarball in the ./configure file but >that was in gdb/configure). Let's work on that, then. Fedora configures GDB with PT support and I thought RHEL would too. Not sure at which version they started. The Debian GDB maintainer promised to enable it but I have not checked, since. >>> How can I check for BTS support? >> >> Hardware support is enumerated by cpuid and published by the kernel in >/proc/cpuinfo under flags (look for 'bts'). Same for PT (look for 'intel_pt'). > >That may be the reason that it wasn't picked up; those aren't in there: > >flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge >mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb >rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable >nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic >movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor >lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb >stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq >rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt >xsavec xsaves arat pku ospke flush_l1d arch_capabilities >bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf > >flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge >mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm >constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid >sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c >rdrand hypervisor lahf_lm abm 3dnowprefetch arat fsgsbase bmi1 hle avx2 >smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt Are you maybe using virtualization? >> For PT, kernel support could be checked by looking at >/sys/bus/event_source/devices/intel_pt/type, which gives the perf event type to >be used for PT. BTS does not need that as it is using a fixed type. > >There's no /sys/bus/event_source/devices/intel_pt/ either. OK, so your system definitely does not support PT. This also explains this error... >event syntax error: > 'intel_pt//u' > \___ Cannot find PMU `intel_pt'. Missing kernel support? > > >I guess in this case there is no use in trying to build with intel-pt, >is it? Yes. You should be able to build GDB with PT support but it wouldn't work on that system. >Thanks for trying to get this working, ideally we have some hints the >next time someone looks out for this and can add a better error message >for bts to GDB. If this turns out to be something that GDB can check with reasonable effort, diagnosing this would certainly help. Like we do for perf_event_paranoid. Regards, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de> Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928