These are chat archives for rust-lang/rust

22nd
Jul 2017
isaacg1
@isaacg1
Jul 22 2017 05:51
Yes, and I followed the instructions as best I could. I'll keep working on them.
isaacg1
@isaacg1
Jul 22 2017 05:57
I figured out what caused that error, and got it to work. I needed to run /sbin/ldconfig as described here: https://stackoverflow.com/questions/1581494/google-perftool-cannot-read-file-libprofiler-so-0
Still not done, because the profile generated is just raw hex pointers.
Andrey Lesnikov
@ozkriff
Jul 22 2017 05:58
I think you need to use pprof to view the results in human-readable form
isaacg1
@isaacg1
Jul 22 2017 05:59
That's what I used to read it. It output raw hex pointers.
pprof --text target/release/colors my-prof.profile | head
Using local file target/release/colors.
Using local file my-prof.profile.
Total: 404 samples
8 2.0% 2.0% 8 2.0% 0x00007fbbacffabe7
6 1.5% 3.5% 6 1.5% 0x00007fbbacfcc41f
4 1.0% 4.5% 4 1.0% 0x00007fbbacfd3230
4 1.0% 5.4% 4 1.0% 0x00007fbbacff5cd0
4 1.0% 6.4% 4 1.0% 0x00007fbbacffdac4
3 0.7% 7.2% 3 0.7% 0x00007fbbacfcc3a0
3 0.7% 7.9% 3 0.7% 0x00007fbbacfcc41b
3 0.7% 8.7% 3 0.7% 0x00007fbbacfcc475
3 0.7% 9.4% 3 0.7% 0x00007fbbacff5793
Andrey Lesnikov
@ozkriff
Jul 22 2017 06:01
oh, these hex pointers.. Hmm, did you compiled your binary in debug mode?
isaacg1
@isaacg1
Jul 22 2017 06:02
Let me redo that
That did it!
Andrey Lesnikov
@ozkriff
Jul 22 2017 06:02
\o/
isaacg1
@isaacg1
Jul 22 2017 06:02
I feel dumb. I gave it the wrong binary on the command line.
Now it says:
pprof --text target/debug/colors my-prof.profile | headUsing local file target/debug/colors.
Using local file my-prof.profile.
Total: 404 samples
270 66.8% 66.8% 404 100.0% inflate::{{impl}}::next_state
17 4.2% 71.0% 38 9.4% core::hash::sip::{{impl}}::d_rounds
12 3.0% 74.0% 12 3.0% colors::squared_location_distance::h4abbca6ec2ec2018
11 2.7% 76.7% 14 3.5% std::collections::hash::table::{{impl}}::peek
8 2.0% 78.7% 39 9.7% colors::make_image::{{closure}}
7 1.7% 80.4% 25 6.2% std::collections::hash::table::{{impl}}::hash
6 1.5% 81.9% 18 4.5% colors::closest_in_frontier::{{closure}}
5 1.2% 83.2% 13 3.2% core::hash::sip::{{impl}}::c_rounds
5 1.2% 84.4% 22 5.4% core::hash::sip::{{impl}}::write
Thanks for your help.
Andrey Lesnikov
@ozkriff
Jul 22 2017 06:03
:+1:
Zhang Cheng
@Matrix-Zhang
Jul 22 2017 16:13
Hi, How to use rust with visual studio 2017, i seen the 1.19 release notes says it supports now, but it still build fail, link.exe not found
Tim Siwula
@tcsiwula
Jul 22 2017 22:00
Is anyone good with running benchmarks? I keep getting "error: an inner attribute is not permitted in this context" when trying to use this reference: https://doc.rust-lang.org/1.12.1/book/benchmark-tests.html
Michal 'vorner' Vaner
@vorner
Jul 22 2017 22:07
@tcsiwula My guess is you placed something before the #![feature(test)] line.
Tim Siwula
@tcsiwula
Jul 22 2017 22:22
I want to bench the function in this file at line #263 https://github.com/paritytech/parity/blob/metropolis-update/ethcore/src/builtin.rs
@vorner Any idea where I can place my benchmark file? I was trying in this directory parity/ethcore/src and that did not work so I tried to create a new cargo mod and do it in there but no go
Tim Siwula
@tcsiwula
Jul 22 2017 22:44
thanks :)