Is trace event sampling still used?

15 views
Skip to first unread message

Primiano Tucci

unread,
Oct 7, 2016, 11:49:24 AM10/7/16
to tracing, platform-architecture-dev, Oystein Eftevaag, Nat Duca, Fadi Meawad, ca...@chromium.org
TL;DR
we are in the process of cleaning up the tracing codebase and I just stumbled upon the 
"event sampling" feature of tracing. Is this something which is actively used?

Note: AFAIK this has nothing to do with:
 - v8 cpu profiler
 - triggering the systrace perf profiler with adb_profiler_chrome

Specifically I am talking about this:

Which in turn causes this:


The data of the sampling profiler seems to be driven by specific macros (TRACE_EVENT_*_SAMPLING). AFAIK those macros are present only in very few places of blink:
https://cs.chromium.org/search/?q=TRACE_EVENT_%5Cw%2B_SAMPLING+f:%5C.c&sq=package:chromium&type=cs

So it sounds like the coverage is somewhat arbitrary.

Question: is this feature still being used? Or was it designed one off for some investigation?

Thanks,
Primiano

Kentaro Hara

unread,
Oct 7, 2016, 10:29:49 PM10/7/16
to Primiano Tucci, Camillo Bruni, tracing, platform-architecture-dev, Oystein Eftevaag, Nat Duca, Fadi Meawad, ca...@chromium.org
I implemented the sampling profiler four years ago :D

And, in short, it's fine to remove.


The data of the sampling profiler seems to be driven by specific macros (TRACE_EVENT_*_SAMPLING). AFAIK those macros are present only in very few places of blink:
https://cs.chromium.org/search/?q=TRACE_EVENT_%5Cw%2B_SAMPLING+f:%5C.c&sq=package:chromium&type=cs 
 
So it sounds like the coverage is somewhat arbitrary.

The coverage was good a couple of quarters ago and used to understand what percentage of the main thread execution is consuming by V8 and V8 bindings. However, Fadi and Camillo have been implementing a nicer profiler (a tracing-based implementation of V8 RuntimeStats), so I removed a lot of TRACE_EVENT_*_SAMPLING macros from the code base assuming that the nicer profiler will come in the near future. That's why the current coverage is not good.

In short, we're in the process of replacing the sampling profiler with Fadi & Camillo's nicer profiler. Feel free to remove the sampling profiler completely.



--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CA%2ByH71d0c%3DA_pqcKHL34sc50EHcVOQMGXEAiYOUVNo2Xz4rWoQ%40mail.gmail.com.



--
Kentaro Hara, Tokyo, Japan

Alexei Filippov

unread,
Oct 7, 2016, 10:46:50 PM10/7/16
to Kentaro Hara, Primiano Tucci, Camillo Bruni, tracing, platform-architecture-dev, Oystein Eftevaag, Nat Duca, Fadi Meawad, Andrey Kosyakov
Besides Fadi and Camillo's runtime call stats sampling, there's JS stacks sampler I just landed to v8, which is used by DevTools and Trace Viewer.
There's third, legacy one in content/renderer/devtools/ It should be gone soon.
None of these does capture the state of blink though. However if we need to collect something like that t should be easy enough to extend runtime call stats to Blink.

-alph

--
You received this message because you are subscribed to the Google Groups "tracing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tracing+unsubscribe@chromium.org.
To post to this group, send email to tra...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/tracing/CABg10jw28NNT5riKnaDXjECWeu-1%3DGfzx%2BYconszGP%3D1o%2BQoHw%40mail.gmail.com.

Kentaro Hara

unread,
Oct 7, 2016, 10:51:06 PM10/7/16
to Alexei Filippov, Primiano Tucci, Camillo Bruni, tracing, platform-architecture-dev, Oystein Eftevaag, Nat Duca, Fadi Meawad, Andrey Kosyakov
On Sat, Oct 8, 2016 at 11:46 AM, 'Alexei Filippov' via platform-architecture-dev <platform-arc...@chromium.org> wrote:
Besides Fadi and Camillo's runtime call stats sampling, there's JS stacks sampler I just landed to v8, which is used by DevTools and Trace Viewer.
There's third, legacy one in content/renderer/devtools/ It should be gone soon.
None of these does capture the state of blink though. However if we need to collect something like that t should be easy enough to extend runtime call stats to Blink.

Yes, I think this is a right direction to go :)


To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.

To post to this group, send email to platform-architecture-dev@chromium.org.

Nat Duca

unread,
Oct 10, 2016, 12:41:29 PM10/10/16
to Kentaro Hara, Alexei Filippov, Primiano Tucci, Camillo Bruni, tracing, platform-architecture-dev, Oystein Eftevaag, Fadi Meawad, Andrey Kosyakov
I'm fine with this direction.

On Sat, Oct 8, 2016 at 4:50 AM, Kentaro Hara <har...@chromium.org> wrote:

Primiano Tucci

unread,
Oct 10, 2016, 12:55:09 PM10/10/16
to Nat Duca, Kentaro Hara, Alexei Filippov, Camillo Bruni, tracing, platform-architecture-dev, Oystein Eftevaag, Fadi Meawad, Andrey Kosyakov
sampling state profiler about to be nuked from orbit in 3... 2... 1... https://codereview.chromium.org/2406703002/
Reply all
Reply to author
Forward
0 new messages