I tried profiling my C++ program with gprof. The program itself ran for about 53 seconds, so I dont understand why it says, main only ran for about 8.29 seconds. Any explanation on this?
Here is an excerpt:
index % time self children called name
<spontaneous>
[2] 20.5 0.00 8.29 main [2]
0.00 8.28 1/1 MPQS::start(std::basic_ofstream<char, std::char_traits<char> >&) [3]
0.00 0.01 1/1 MPQS::MPQS(NTL::ZZ, long) [36]
0.00 0.00 1/1 MPQS::~MPQS() [78]
-----------------------------------------------
0.00 8.28 1/1 main [2]
[3] 20.5 0.00 8.28 1 MPQS::start(std::basic_ofstream<char, std::char_traits<char> >&) [3]
7.15 1.08 801/801 MPQS::sieve() [4]
0.00 0.04 801/801 MPQS::find_smooth_vals() [23]
0.01 0.00 1/1 MPQS::try_solutions(NTL::mat_GF2&) [35]
0.00 0.00 801/801 MPQS::compute_coeffecients() [59]
-----------------------------------------------
7.15 1.08 801/801 MPQS::start(std::basic_ofstream<char, std::char_traits<char> >&) [3]
[4] 20.4 7.15 1.08 801 MPQS::sieve() [4]
1.08 0.00 801/801 MPQS::find_candidates() [9]
Were you printing results to the console? gprof doesn't count blocked time. See this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With