thlorenz / flamegraph

Generates flamegraphs with Node.js or in the browser.
http://thlorenz.github.io/flamegraph/web/
MIT License
165 stars 28 forks source link

perf-script.txt parsing issue #13

Closed coultknight closed 7 years ago

coultknight commented 9 years ago

when loading...Error: Unable to detect input type for "node 9097 2977.728765: cpu-clock:u: "

perf-script.txt -> node 9097 2977.728765: cpu-clock:u: 7f13b6880c7d do_lookup_x (/usr/lib64/ld-2.17.so)

node 9097 2977.749705: cpu-clock:u: 89edf0 v8::internal::compiler::Pipeline::SetUp (/usr/local/bin/node) eafe8d v8::base::CallOnceImpl (/usr/local/bin/node) be3d7a v8::internal::V8::Initialize (/usr/local/bin/node) c9e391 node::Start (/usr/local/bin/node) 7f13b5690af5 __libc_start_main (/usr/lib64/libc-2.17.so)

node 9097 2977.750277: cpu-clock:u: 9f2d30 v8::internal::LargeObjectSpace::LargeObjectSpace (/usr/local/bin/node) 962c06 v8::internal::Heap::SetUp (/usr/local/bin/node) a8af9f v8::internal::Isolate::Init (/usr/local/bin/node) be463e v8::Locker::Initialize (/usr/local/bin/node) c9e3a8 node::Start (/usr/local/bin/node) 7f13b5690af5 __libc_start_main (/usr/lib64/libc-2.17.so)

node 9097 2977.750772: cpu-clock:u: a05ffe v8::internal::HEnvironmentLivenessAnalysisPhase::HEnvironmentLivenessAnalysisPhase (/usr/local/bin/node) a41372 v8::internal::HGraph::Optimize (/usr/local/bin/node) 8571b3 v8::internal::OptimizeGraph (/usr/local/bin/node) 85a7dd v8::internal::DoGenerateCodev8::internal::ArrayNoArgumentConstructorStub (/usr/local/bin/node) 85a919 v8::internal::ArrayNoArgumentConstructorStub::GenerateCode (/usr/local/bin/node) 8544b1 v8::internal::CodeStub::GetCode (/usr/local/bin/node) bf6989 v8::internal::ArrayConstructorStubBase::GenerateStubsAheadOfTime (/usr/local/bin/node) bf8b01 v8::internal::CodeStub::GenerateStubsAheadOfTime (/usr/local/bin/node) 964d10 v8::internal::Heap::CreateInitialObjects (/usr/local/bin/node) 9795b0 v8::internal::Heap::CreateHeapObjects (/usr/local/bin/node) a8b333 v8::internal::Isolate::Init (/usr/local/bin/node) be463e v8::Locker::Initialize (/usr/local/bin/node) c9e3a8 node::Start (/usr/local/bin/node)

bywo commented 9 years ago

I'm also seeing this.

@edumeyer were you able to find a workaround?

mbuttu commented 8 years ago

I'm also seeing this, but using the CSV file exported from the OS X Instruments app as input:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Unable to detect input type for
"Running Time,Self (ms),,Symbol Name"
    at getConverter (/usr/local/lib/node_modules/flamegraph/node_modules/cpuprofilify/lib/get-converter.js:27:9)
    at CpuProfilifier.convert (/usr/local/lib/node_modules/flamegraph/node_modules/cpuprofilify/index.js:70:26)
    at flamegraph (/usr/local/lib/node_modules/flamegraph/index.js:47:30)
    at ondata (/usr/local/lib/node_modules/flamegraph/from-stream.js:35:17)
    at ConcatStream.<anonymous> (/usr/local/lib/node_modules/flamegraph/node_modules/concat-stream/index.js:36:43)
    at emitNone (events.js:72:20)
    at ConcatStream.emit (events.js:166:7)
    at finishMaybe (/usr/local/lib/node_modules/flamegraph/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:460:14)
    at endWritable (/usr/local/lib/node_modules/flamegraph/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:469:3)
    at ConcatStream.Writable.end (/usr/local/lib/node_modules/flamegraph/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js:436:5)

I'm using OS X 10.10.5 and node.js 5.1.0.

I used the following the examples

bringingkatigbak commented 8 years ago

for Error: Unable to detect input type for "Running Time,Self (ms),,Symbol Name"

try removing (ms) including the white space before the opening parens (

That should eliminate that error message in both the cli and webapp. However a different (already reported) error will be thrown by the webapp :)

thlorenz commented 7 years ago

@edumeyer should be fixed with latest version (due to upgrade of cpuprofilify).