-
Notifications
You must be signed in to change notification settings - Fork 52
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
Failed to get bitcode from object file for LTO #32
Comments
Ironically if I try
|
Any update on fixing this issue? |
Sorry @ysun, no luck |
@jiayihu Then did you get any other solution to get rust call-graph ? |
We have also observed this error: BUG: failed to parse .ll file: Failure(("define internal fastcc void @_Z.... The following is a MRE. Run this command: RUSTFLAGS = "-C embed-bitcode" cargo +nightly call-stack --example rme > mre.dot With this code as use lazy_static::lazy_static;
use rand::distributions::{Distribution, Uniform};
use std::time::Duration;
use tokio::time::{sleep, Instant};
lazy_static! { static ref START_TIME: Instant = Instant::now(); }
#[tokio::main]
async fn main() {
let page = get_page(42).await;
println!("Page #42: {:?}", page);
}
async fn get_page(i: usize) -> Vec<usize> {
let millis = Uniform::from(5_000..6_000).sample(&mut rand::thread_rng());
println!( "[{}] # get_page({}) will complete in {} ms on {:?}",
START_TIME.elapsed().as_millis(),
i,
millis,
std::thread::current().id()
);
sleep(Duration::from_millis(millis)).await;
println!("[{}] # get_page({}) completed",
START_TIME.elapsed().as_millis(),
i
);
(10 * i..10 * (i + 1)).collect()
} |
Observing the same on the "hello world" created via cargo +nightly call-stack --bin hello --target x86_64-unknown-linux-gnu > hello.dot
@jiayihu , looks suspiciously similar to what @taqtiqa-mark is experiencing in #33 |
56: Fix parsing r=japaric a=thvdveld This commit fixes some parsing errors I had. Maybe this fixes #22, #28, #32 and #33. Parsing is fixed for my own project, though I still have logged errors (at least the dot file is generated): ``` [2022-04-28T15:23:33Z ERROR cargo_call_stack] BUG? no callees for `void ({}*)` [2022-04-28T15:23:33Z ERROR cargo_call_stack] BUG? no callees for `void ({}*, void ({}*)*)` ``` Co-authored-by: Thibaut Vandervelden <thvdveld@vub.be>
This issue seems to only affect Cargo project using the default [profile.release]
lto = 'fat' A fix may be adding after enabling fat LTO I get a LLVM IR parser error when running cargo-call-stack on a "Hello, world" project but that's a separate issue from this. |
When trying to use the tool I get the following error:
Same error even with the previous nightly
rustc 1.49.0-nightly (b1496c6e6 2020-10-18)
The text was updated successfully, but these errors were encountered: