Re: And another thing...

Maynard Johnson <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 07/30/2014 12:06 PM, Andrew Haley wrote:
> I kept getting  "now trying to kill convert pid..." error messages.
> Turns out that there is only a 5s wait for the daemon to terminate,
> which is nowhere near long enough if you have lot of symbols.
Andrew, what were you profiling when you saw this?  Unfortunately, the term "convert" is used for two different tasks in the internal workings of operf.  First, we have the perf_events-formatted data from the kernel being converted to oprofile sample file format.  Second, we run the opjitconv to convert any JVM jitdump files to ELF files.  It is the latter task for which you are seeing this message. I agree the fixed time limit is not ideal.  I'm guessing you are profiling lots of JVMs to see this message.  When profiling a large busy system, the conversion of perf-format data to oprofile sample file format can cause noticeable overhead, and you might want to think about using the --lazy-conversion option in that case.

As for the patch, I'm not sure I want to change one hard-coded time limit for another. I'll give this some thought.

-Maynard
> 
> This fixed it, but a fixed time limit seems wrong:
> 
> diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp
> index 51f55a5..b12aadf 100644
> --- a/pe_profiling/operf.cpp
> +++ b/pe_profiling/operf.cpp
> @@ -492,10 +492,10 @@ static end_code_t _kill_operf_read_pid(end_code_t rc)
>                 int option = WNOHANG;
>                 int wait_rc;
>                 gettimeofday(&tv, NULL);
> -               if (tv.tv_sec > start_time_sec + 5) {
> +               if (tv.tv_sec > start_time_sec + 45) {
>                         keep_trying = false;
>                         option = 0;
> -                       cerr << "now trying to kill convert pid..." << endl;
> +                       cerr << "now trying to kill convert pid 45s..." << endl;
> 
>                         if (kill(operf_read_pid, SIGUSR1) < 0) {
>                                 perror("Attempt to stop operf-read process failed");
> 
> Andrew.
> 
> 
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls. 
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> oprofile-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
> 


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.