How to add TRACE_EVENT to some pieces of source code?

31 views
Skip to first unread message

mrc3...@gmail.com

unread,
Apr 20, 2018, 5:40:35 PM4/20/18
to Chromium-dev
Hi everyone

I am new to chromium. I am going to add some tracepoints to chromium's source code. I followed the instructions HERE but I cannot see the event in my trace. I added the following part to line 377 as well as doSomethingCostly()to line 389 in the file "/home/majid/Documents/chromium/src/third_party/blink/renderer/core/script/html_parser_script_runner.cc"
void doSomethingCostly() {
  TRACE_EVENT0("blink", "doSomethingCostly");
}
Moreover, I added #include "base/trace_event/trace_event.h" to the top of source file. So, whenever the HTMLParserScriptRunner::ExecuteScriptsWaitingForLoad is called, the added tracepoint should be run, but I cannot see that.

Any response would be appreciated. 

Alex Clarke

unread,
Apr 20, 2018, 6:25:50 PM4/20/18
to mrc3...@gmail.com, Chromium-dev
When you took a trace was the "blink" trace event category enabled?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/fa7b5b33-905f-4bb7-b583-8749389df689%40chromium.org.

Reply all
Reply to author
Forward
0 new messages