Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to detect input type for… #11

Open
garthk opened this issue May 6, 2015 · 7 comments
Open

Unable to detect input type for… #11

garthk opened this issue May 6, 2015 · 7 comments

Comments

@garthk
Copy link

garthk commented May 6, 2015

After taking a trace from node 0.12.2 using Instruments 6.3.1, and exporting the Call Tree as 27200.csv:

$ cat 27200.csv | flamegraph --inputtype instruments > 27200.svg && open 27200.svg
events.js:85
      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 ConcatStream.emit (events.js:129:20)
    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)
    at Socket.onend (_stream_readable.js:505:10)

I've also tried flamegraph -t instruments. I'm not sure why cpuprofilify is trying to detect the input type. Does flamegraph not pass its --inputtype?

@phillipj
Copy link

This is a cpuprofilify issue, just opened a PR fixing it.

@phillipj
Copy link

FYI @garthk edit your .csv by removing (ms) from the first line. That should fix your issue while waiting for the PR to merge

@garthk
Copy link
Author

garthk commented May 29, 2015

Thanks for the workaround!

@bringingkatigbak
Copy link

likewise, thanks for the workaround! however, how are you getting the memory addresses mapped to the function names? (the webapp uses the pid-n.map)

@phillipj
Copy link

phillipj commented Mar 1, 2016

@bringingkatigbak Its been a while since I've used this. Could it be you need the --map parameter I tried to expose in thlorenz/cpuprofilify#5 ?

@bringingkatigbak
Copy link

@phillipj I see that thlorenz/flamegraph consumes thlorenz/cpuprofilify which both have pull requests to support the -m option. how do these two pull request reconcile with each other?

github.com/thlorenz/cpuprofilify/pull/5
github.com/thlorenz/flamegraph/pull/12

@phillipj
Copy link

phillipj commented Mar 2, 2016

@bringingkatigbak both cpuprofilify and flamegraph comes with an CLI tool in addition to the npm module you normally require() in the code. As far as I see they could both be merged as they add --map to their respective CLI tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants