Open 12932 opened 4 months ago
Access to some of the registers through the mrc
/mrs
instruction may be restricted to kernel space, depending on the kernel configuration. See 5fbb811f5d for an example of how this was handled by Tracy some time ago in code that has since been removed.
This is an issue in https://github.com/mjansson/rpmalloc, as seen in https://github.com/mjansson/rpmalloc/blob/b41aa177fc56d1d3d0c61531cd1719f38fc20d5d/rpmalloc/rpmalloc.c#L787-L818
Please create an issue for rpmalloc. It doesn't seem necessary to resort to assembly hacks to get a thread id (usually a gettid()
call). At least a compatible fallback should be available, in my opinion.
I'm trying to get Tracy targeting an embedded linux target, after building successfully and deploying my binary and running it, I get a SIGILL error. Running with GDB I get the following:
Showing the assembly, it's this instruction that appears to be problematic:
0xf232c <_ZN5tracyL13get_thread_idEv+12> mrc 15, 0, r3, cr13, cr0, {3}
I'm not sure exactly why it's an illegal instruction, i'm no expert in ARM assembly. My target platform has the following:
Is it possible the problematic assembly isn't supported on my version of ARM?