Uh oh!
There was an error while loading. Please reload this page.
Use platform-dependent mcount function - #57244
Conversation
rust-highfive
commented
Jan 1, 2019
(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)
petrochenkov
commented
Jan 1, 2019
r? @nagisa |
quark-zju
commented
Jan 2, 2019
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. |
namhyung
commented
Jan 3, 2019
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. |
nagisa
commented
Jan 3, 2019
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. |
Dylan-DPC-zz
commented
Jan 21, 2019
ping from triage @quark-zju any updates? |
quark-zju
commented
Jan 23, 2019
@Dylan-DPC I'm still on vacation. I'll get back to this next week if everything goes well. |
Dylan-DPC-zz
commented
Feb 4, 2019
ping from triage @quark-zju any updates on this? |
Centril
commented
Feb 23, 2019
ping from triage @quark-zju :) |
Dylan-DPC-zz
commented
Mar 11, 2019
ping from triage @quark-zju |
Use platform dependent mcount function closerust-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 closerust-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.