Skip to content

Instantly share code, notes, and snippets.

@vext01
Created January 12, 2021 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vext01/ead8ceabaf4c57cf099c7558aa951151 to your computer and use it in GitHub Desktop.
Save vext01/ead8ceabaf4c57cf099c7558aa951151 to your computer and use it in GitHub Desktop.
Profiling
Costs > 1%.
Before:
```
Overhead Command Shared Object Symbol
9.51% mt::tests::simp ykrt-589c0db448b16d4d [.] core::sync::atomic::atomic_compare_exchange
8.78% mt::tests::simp ykrt-589c0db448b16d4d [.] core::intrinsics::is_aligned_and_not_null
7.89% mt::tests::simp ykrt-589c0db448b16d4d [.] core::option::Option<T>::as_ref
3.52% mt::tests::simp ykrt-589c0db448b16d4d [.] core::intrinsics::is_aligned_and_not_null
3.44% mt::tests::simp ykrt-589c0db448b16d4d [.] core::num::<impl usize>::checked_mul
3.08% mt::tests::simp ykrt-589c0db448b16d4d [.] core::intrinsics::copy_nonoverlapping
2.76% mt::tests::simp ykrt-589c0db448b16d4d [.] core::ptr::const_ptr::<impl *const T>::guaranteed_eq
2.45% mt::tests::simp ykrt-589c0db448b16d4d [.] <alloc::vec::Vec<T,A> as core::ops::deref::Deref>::deref
2.05% mt::tests::simp ykrt-589c0db448b16d4d [.] core::slice::raw::from_raw_parts
2.04% mt::tests::simp ykrt-589c0db448b16d4d [.] core::ptr::const_ptr::<impl *const T>::is_null
1.97% mt::tests::simp ykrt-589c0db448b16d4d [.] core::sync::atomic::atomic_load
1.97% mt::tests::simp ykrt-589c0db448b16d4d [.] ykrt::mt::tests::simple_multithreaded_interpreter::simple_interp_step
1.88% mt::tests::simp ykrt-589c0db448b16d4d [.] core::intrinsics::is_aligned_and_not_null
1.61% mt::tests::simp libc-2.28.so [.] __memmove_avx_unaligned_erms
1.59% mt::tests::simp ykrt-589c0db448b16d4d [.] core::num::<impl usize>::overflowing_mul
1.44% mt::tests::simp ykrt-589c0db448b16d4d [.] ykrt::mt::MTThread::transition_location
1.33% mt::tests::simp ykrt-589c0db448b16d4d [.] alloc::raw_vec::RawVec<T,A>::ptr
1.32% mt::tests::simp ykrt-589c0db448b16d4d [.] core::ptr::mut_ptr::<impl *mut T>::guaranteed_eq
1.23% mt::tests::simp ykrt-589c0db448b16d4d [.] core::intrinsics::is_nonoverlapping
1.15% mt::tests::simp ykrt-589c0db448b16d4d [.] ykrt::mt::tests::simple_multithreaded_interpreter::_$u7b$$u7b$closure$u7d$$u7d$::h8068a9f2625f0ce7
1.15% mt::tests::simp ykrt-589c0db448b16d4d [.] core::ptr::mut_ptr::<impl *mut T>::is_null
1.14% mt::tests::simp ykrt-589c0db448b16d4d [.] alloc::raw_vec::RawVec<T,A>::ptr
1.06% mt::tests::simp ykrt-589c0db448b16d4d [.] core::slice::raw::from_raw_parts
1.04% mt::tests::simp ykrt-589c0db448b16d4d [.] core::num::<impl usize>::checked_mul
```
After:
```
Overhead Command Shared Object Symbol
10.34% mt::tests::simp ykrt-b424f141bb012e29 [.] core::sync::atomic::atomic_compare_exchange
9.77% mt::tests::simp ykrt-b424f141bb012e29 [.] core::intrinsics::is_aligned_and_not_null
5.47% mt::tests::simp ykrt-b424f141bb012e29 [.] core::num::<impl usize>::checked_mul
5.18% mt::tests::simp ykrt-b424f141bb012e29 [.] core::intrinsics::is_aligned_and_not_null
4.58% mt::tests::simp ykrt-b424f141bb012e29 [.] core::option::Option<T>::as_ref
4.38% mt::tests::simp ykrt-b424f141bb012e29 [.] core::ptr::const_ptr::<impl *const T>::guaranteed_eq
3.47% mt::tests::simp ykrt-b424f141bb012e29 [.] core::intrinsics::copy_nonoverlapping
3.22% mt::tests::simp libc-2.28.so [.] __memmove_avx_unaligned_erms
2.98% mt::tests::simp ykrt-b424f141bb012e29 [.] core::ptr::mut_ptr::<impl *mut T>::guaranteed_eq
2.85% mt::tests::simp ykrt-b424f141bb012e29 [.] core::slice::raw::from_raw_parts
2.22% mt::tests::simp ykrt-b424f141bb012e29 [.] core::ptr::const_ptr::<impl *const T>::is_null
2.14% mt::tests::simp ykrt-b424f141bb012e29 [.] core::num::<impl usize>::overflowing_mul
2.10% mt::tests::simp ykrt-b424f141bb012e29 [.] alloc::raw_vec::RawVec<T,A>::ptr
1.98% mt::tests::simp ykrt-b424f141bb012e29 [.] ykrt::mt::MTThread::transition_location
1.97% mt::tests::simp ykrt-b424f141bb012e29 [.] core::intrinsics::is_aligned_and_not_null
1.84% mt::tests::simp ykrt-b424f141bb012e29 [.] core::sync::atomic::atomic_load
1.57% mt::tests::simp ykrt-b424f141bb012e29 [.] core::ptr::mut_ptr::<impl *mut T>::is_null
1.44% mt::tests::simp ykrt-b424f141bb012e29 [.] <alloc::vec::Vec<T,A> as core::ops::deref::Deref>::deref
1.42% mt::tests::simp ykrt-b424f141bb012e29 [.] core::ptr::const_ptr::<impl *const T>::is_null
1.23% mt::tests::simp ykrt-b424f141bb012e29 [.] <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
1.20% mt::tests::simp ykrt-b424f141bb012e29 [.] ykrt::mt::tests::simple_multithreaded_interpreter::_$u7b$$u7b$closure$u7d$$u7d$::hd5f3e013b4618ed6
1.19% mt::tests::simp ykrt-b424f141bb012e29 [.] ykrt::mt::MTThread::control_point
1.18% mt::tests::simp ykrt-b424f141bb012e29 [.] core::intrinsics::is_nonoverlapping
1.17% mt::tests::simp ykrt-b424f141bb012e29 [.] ykrt::mt::tests::simple_multithreaded_interpreter::simple_interp_step
1.08% mt::tests::simp ykrt-b424f141bb012e29 [.] core::slice::raw::from_raw_parts
0.95% mt::tests::simp ykrt-b424f141bb012e29 [.] core::num::<impl usize>::saturating_mul
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment