-
Notifications
You must be signed in to change notification settings - Fork 18
Description
During the PGO optimization, I found an interesting example, when a Rust program has a C/C++ dependency in a critical performance path. As an example - TiKV. TiKV depends on https://github.com/tikv/rust-rocksdb/ that under-the-hood compiles RocksDB (https://github.com/tikv/rust-rocksdb/tree/master/librocksdb_sys).
The problem is that PGO instrumentation flags are not propagated to the non-Rust dependencies, so they are not PGO-optimized during the cargo-pgo optimization.
Honestly, not sure what we can/should do here. Because I understand that implementing PGO flags propagation to the non-Rust dependencies would be difficult like hell: different C compilers with different options, need to think somehow modify build.rs scripts, etc.
Right now I see the only option to remediate it - optimize with BOLT since it works on the resulting binary. Probably we need to document this limitation somewhere in cargo-pgo.