Use platform-dependent mcount function#57244
Use platform-dependent mcount function#57244quark-zju wants to merge 1 commit intorust-lang:masterfrom quark-zju:mcount
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
| const_cstr!("_mcount") | ||
| } else { | ||
| const_cstr!("mcount") | ||
| }; |
There was a problem hiding this comment.
This does not seem to cover it.
Looking at clang’s this->MCountName instances:
darwinuses\01mcount;- On Aarch64 if abi is gnueabi,
\01_mcountis used; - On ARM-linux or ARM-unknown if abi is gnueabi
\01__gnu_mcount_ncis used and\01mcountif not gnueabi;
Please make this a target property (specified in target files) and use that property here.
There was a problem hiding this comment.
(I used github search like this. I’m sure it missed some cases as well)
|
r? @nagisa |
|
Thanks for the comments! I was aware of the other mcount names. I didn't add the Meanwhile I'm on vacation and have temporarily lost access to fast network, fast machines, and osx platforms. I'll continue work on this when I regain access. |
|
I also don't know why the Please take a look at below: https://github.com/torvalds/linux/blob/master/arch/arm/kernel/entry-ftrace.S The tools using the mcount facility (including uftrace) will expect same stack/register layout from the name. |
It is usually the case that tools like In any case, I would recommend to just add a target property for now, without worrying about what value would be the most correct for the target. Change only the targets where you’re confident about the difference and leave the other platforms with a default of some sort (e.g. |
|
ping from triage @quark-zju any updates? |
|
@Dylan-DPC I'm still on vacation. I'll get back to this next week if everything goes well. |
|
ping from triage @quark-zju any updates on this? |
|
ping from triage @quark-zju :) |
|
ping from triage @quark-zju |
Use platform dependent mcount function close rust-lang#59097 This pull-request is based on rust-lang#57244 and [here](https://github.com/llvm-mirror/clang/search?q=MCountName&unscoped_MCountName). r? @nagisa
Use platform dependent mcount function close #59097 This pull-request is based on #57244 and [here](https://github.com/llvm-mirror/clang/search?q=MCountName&unscoped_MCountName). r? @nagisa
Use platform dependent mcount function close rust-lang#59097 This pull-request is based on rust-lang#57244 and [here](https://github.com/llvm-mirror/clang/search?q=MCountName&unscoped_MCountName). r? @nagisa
Follow up with @nagisa's comment on #57220. Not all platforms use the
mcountname. Added a test.