Haven't built Node from source before, but starting on it now.

One other question, should I be running with --log or --log_all or some 
other version of --log?  I'm assuming which I want to run with depends on 
what I'm trying to profile, but for now I'm trying to get CPU burn.

On Friday, October 26, 2012 4:13:30 PM UTC-4, Ben Noordhuis wrote:
>
> On Fri, Oct 26, 2012 at 7:59 PM, Andrew Spyker 
> <[email protected]<javascript:>> 
> wrote: 
> > Not sure if this is the best place to post this, but given I'm 80% 
> certain 
> > this isn't a profiler module issue given it seems to be an issue with 
> the v8 
> > log file itself when trying to lazy start profiling, I think this is the 
> > right place to post. 
> > 
> > Please see the attached zip for my test case. 
> > 
> > I'm trying to profile a node server app, but want to avoid profiling 
> > startup.  Therefore, I'm trying to use the prof_lazy support in node/v8. 
>  If 
> > I use the --prof support, the profiler works as expected.  If I instead 
> use 
> > the --prof_lazy --prof and --log_all, the v8.log is written to, but it 
> ends 
> > up being non-parseable by nprof (from profiler module).  It looks like 
> the 
> > problem is that with --prof_lazy node isn't writing out the code that is 
> > loaded until I call profiler.resume() which means all the symbols that 
> > should have been known are not. 
> > 
> > I would love for someone to hack the attached test case and driver 
> script 
> > (test.sh) to make the v8-lazystartprofiling.nprof.txt look clean instead 
> of 
> > all the  unknown command log entries and get the unaccounted ticks to be 
> > zero.  Note the comparable log file v8-standardprofiling.nprof.txt is 
> clean 
> > in these two areas (no unknown commands and all ticks accounted for). 
> > 
> > If I can get this working, I will likely throw this up as an example 
> > somewhere.  Maybe I'm missing something basic, but I haven't been able 
> to 
> > find a single place that puts all the pieces together in a single 
> example 
> > like this. 
> > 
> > Andrew Spyker 
>
> It's caused by what I suspect is a bug in V8.  I'd been meaning to 
> bring it up with the V8 guys but I admit I forgot all about it.  [1] 
> is a patch (for node.js) that should address it.  Try it and let me 
> know if it works for you. 
>
> [1] https://gist.github.com/fdcbcb16594e699cffe3 
>
> diff --git a/deps/v8/src/log.cc b/deps/v8/src/log.cc 
> index b049ffe..662916e 100644 
> --- a/deps/v8/src/log.cc 
> +++ b/deps/v8/src/log.cc 
> @@ -283,11 +283,7 @@ void Profiler::Engage() { 
>    if (engaged_) return; 
>    engaged_ = true; 
>
> -  // TODO(mnaganov): This is actually "Chromium" mode. Flags need to 
> be revised. 
> -  // http://code.google.com/p/v8/issues/detail?id=487 
> -  if (!FLAG_prof_lazy) { 
> -    OS::LogSharedLibraryAddresses(); 
> -  } 
> +  OS::LogSharedLibraryAddresses(); 
>
>    // Start thread processing the profiler buffer. 
>    running_ = true; 
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to