-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use platform-dependent mcount function #57244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to cover it.
Looking at clang’s this->MCountName
instances:
darwin
uses\01mcount
;- On Aarch64 if abi is gnueabi,
\01_mcount
is used; - On ARM-linux or ARM-unknown if abi is gnueabi
\01__gnu_mcount_nc
is used and\01mcount
if not gnueabi;
Please make this a target property (specified in target files) and use that property here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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
mcount
name. Added a test.