View Issue Details

IDProjectCategoryView StatusLast Update
0001193XdebugTracingpublic2021-03-20 18:04
Reportergekkie Assigned Toderick  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionwon't fix 
Summary0001193: Feature request: Chrome Trace format
Description

I'd like to request a feature to allow the traceoutput to be in the Chrome tracing format. From my understanding this is a simple(ish) JSON format that would allow easier viewing inside the browser instead of kcachegrind-like applications.

I ask this due to the fact that it's becomming more and more of a go to visualization technique for quickly analyzing a tracefile.

The spec is defined (https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/) but my actual C skills are non existent otherwise i would have liked to provide some kind of implementation ;)

Additional Information

Links to various articles and documentation:

TagsNo tags attached.
Operating Systemn/a
PHP Version5.6.10-5.6.14

Activities

derick

2015-11-04 10:26

administrator   ~0003198

This looks like a good add. I'll do some more checking later, after PHP 7 support is out and stable.

derick

2016-12-10 09:53

administrator   ~0003976

I have (finally) had another look at this, but I can't see how I can make it nest depending on function. It doesn't seem that there is a way to show dependencies with this.

If you could make me a JSON file, accompanying a script, of how the tracer would/could visualise a run of a PHP script, then I'm happy to look at this again.

derick

2017-01-03 18:51

administrator   ~0004132

Are you still interested in this gekkie?

gekkie

2017-01-04 15:33

reporter   ~0004157

@derick, thanks for looking into this! (lost my credentials for a while hence the long delay in my response)

Since my original request things have changed and the need for replacing webgrind has diminished somewhat. (although i still believe in the usefullness to have flamegraphs of PHP processes)

But to answer your question the format for 'nested' calls would be this:
{ ..., "ts": 1.0, "tid": 1, "ph": "B", "name": "A"},
{ ..., "ts": 1.1, "tid": 1, "ph": "B", "name": "Asub"},
{ ..., "ts": 3.9, "tid": 1, "ph": "E"},
{ ..., "ts": 4.0, "tid": 1, "ph": "E"}

This seems to follow the ftrace format in that it's more about timings of events (function calls in php i guess?) than for individual memory usage increases etc...

right?

If anything, i thougth this might have been usefull to visualize the duration / weight of a PHP execution at that time. Since then, with the launch of i.e. blackfire.io this might be less usefull ?

derick

2017-01-11 23:52

administrator   ~0004175

Better does something like this work:

[
{ "pid": 1, "ts": 1.0, "dur": 15, "tid": 1, "ph": "X", "name": "A"},
{ "pid": 1, "ts": 3.1, "dur": 5, "tid": 1, "ph": "X", "name": "Asub", "args": { "1" : "fasdf" } },
{ "pid": 1, "ts": 10.3, "dur": 1, "tid": 1, "ph": "X", "name": "Bsub" },
{ "pid": 1, "ts": 4.1, "dur": 2.55, "tid": 1, "ph": "X", "name": "Csub", "args": { "1" : "fasdf" } },
{ "pid": 1, "ts": 9.1, "dur": 0.5, "tid": 1, "ph": "X", "name": "Asub", "args": { "1" : "fasdf" } }
]

derick

2021-03-17 09:20

administrator   ~0005737

Is this issue still relevant to you?

gekkie

2021-03-18 07:33

reporter   ~0005799

Thanks for the reminder, since then we've moved more and more to Blackfire (and other) forms of tracing and insight. Thus that mitigates the need (for us atleast) to have XDebug also include such features / functionality.

Thanks again for your great work!

derick

2021-03-20 18:04

administrator   ~0005802

Thanks. I'll close this one for now then. If this ever becomes an issue in the future, feel free to make a new issue.

Issue History

Date Modified Username Field Change
2015-11-04 09:47 gekkie New Issue
2015-11-04 10:26 derick Note Added: 0003198
2016-12-10 09:53 derick Note Added: 0003976
2016-12-10 09:53 derick Assigned To => derick
2016-12-10 09:53 derick Status new => feedback
2017-01-03 18:51 derick Note Added: 0004132
2017-01-04 15:33 gekkie Note Added: 0004157
2017-01-04 15:33 gekkie Status feedback => assigned
2017-01-11 23:52 derick Note Added: 0004175
2017-01-13 16:50 derick Status assigned => acknowledged
2020-03-12 16:49 derick Category Feature/Change request => Tracing
2021-03-17 09:20 derick Status acknowledged => feedback
2021-03-17 09:20 derick Note Added: 0005737
2021-03-18 07:33 gekkie Note Added: 0005799
2021-03-18 07:33 gekkie Status feedback => assigned
2021-03-20 18:04 derick Status assigned => resolved
2021-03-20 18:04 derick Resolution open => won't fix
2021-03-20 18:04 derick Note Added: 0005802