summaryrefslogtreecommitdiffstats
path: root/content/browser/tracing/tracing_ui.cc
Commit message (Collapse)AuthorAgeFilesLines
* Implement TracingController::GetMonitoringStatusharaken@chromium.org2014-01-161-8/+40
| | | | | | | | | | | | | | | trace-viewer side CL is here: https://codereview.appspot.com/52710047 Currently the monitoring mode doesn't work correctly when we reload about:tracing. This is because reloaded about:tracing fails in extracting the current monitoring status (See my comment in patch set 2). This CL implements TracingController::GetMonitoringStatus so that trace-viewer/src/about_tracing/profiling_view.js can get the current monitoring status when loading the profiling view. TEST=content_browsertests::EnableCaptureAndDisableMonitoring R=nduca@chromium.org Review URL: https://codereview.chromium.org/139313005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245211 0039d316-1c4b-4281-b951-d872f2087c98
* Add a mechanism to let TracingController invoke JavaScript via TracingUIharaken@chromium.org2014-01-141-0/+11
| | | | | | | | | | | This CL enables TracingController to call JavaScript in about:tracing tabs when a monitoring state is changed. If one tab changes the monitoring state, TracingController notifies the change to all other about:tracing tabs. That way we can keep the monitoring state displayed in all about:tracing tabs consistent. Review URL: https://codereview.chromium.org/127703002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244709 0039d316-1c4b-4281-b951-d872f2087c98
* Implement sampling profiler (chromium side change)haraken@chromium.org2014-01-081-13/+81
| | | | | | | | | | | | | | | | | Trace-viewer side change is here: https://codereview.appspot.com/39310043 Screenshot of the profiler: http://haraken.info/null/sampling_tracing.png Design document: https://docs.google.com/a/google.com/document/d/1j39sbA9ECTwFFlxbhSD1EvJnGfYeS5EUJ05yxuku6VY/edit TBR=phajdan.jr NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242671 Review URL: https://codereview.chromium.org/109933006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243528 0039d316-1c4b-4281-b951-d872f2087c98
* Return error on JSON request failureswangxianzhu@chromium.org2014-01-061-7/+17
| | | | | | | | | | | | | | Previously on a TracingController error, OnBeginRequest returns false, and then WebUIDataSource will return the default resource (tracing.html). This will cause a successful XHR request and a JSON parse failure in tracing frontend code. Return "##ERROR##" to express the error so that the frontend can handle the error. BUG=331286 Review URL: https://codereview.chromium.org/117323008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243162 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 242671 "Implement sampling profiler (chromium side change)"haraken@chromium.org2013-12-281-81/+12
| | | | | | | | | | | | | | | | | | | | | > Implement sampling profiler (chromium side change) > > Trace-viewer side change is here: https://codereview.appspot.com/39310043 > > Screenshot of the profiler: http://haraken.info/null/sampling_tracing.png > > Design document: https://docs.google.com/a/google.com/document/d/1j39sbA9ECTwFFlxbhSD1EvJnGfYeS5EUJ05yxuku6VY/edit > > TBR=phajdan.jr > NOTRY=true > > Review URL: https://codereview.chromium.org/109933006 TBR=haraken@chromium.org Review URL: https://codereview.chromium.org/122053002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242679 0039d316-1c4b-4281-b951-d872f2087c98
* Implement sampling profiler (chromium side change)haraken@chromium.org2013-12-281-12/+81
| | | | | | | | | | | | | | | Trace-viewer side change is here: https://codereview.appspot.com/39310043 Screenshot of the profiler: http://haraken.info/null/sampling_tracing.png Design document: https://docs.google.com/a/google.com/document/d/1j39sbA9ECTwFFlxbhSD1EvJnGfYeS5EUJ05yxuku6VY/edit TBR=phajdan.jr NOTRY=true Review URL: https://codereview.chromium.org/109933006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242671 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply "Remove TraceController"wangxianzhu@chromium.org2013-12-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts https://codereview.chromium.org/101543004/ which was created when suspected the reason of failure of telemetry tests, but turned out not the real reason. Reapply. Reapply the following change: > Revert "Revert 237280 "Remove TraceController"" > > This reverts commit 6aa58b8599840160df945afa89e7482d14d1c4d4. > > Fixed double-close issue when ending recording. > > > Revert 237280 "Remove TraceController" > > > > Seems to have broken trace-based telemetry benchmarks on android. > > > > BUG=323749 > > > > > Remove TraceController > > > > > > TraceController is obsoleted by TracingController. > > > Changed all remaining clients to use TracingController. > > > > > > BUG=none > > > > > > Review URL: https://codereview.chromium.org/67683003 > > > > TBR=wangxianzhu@chromium.org > > > > Review URL: https://codereview.chromium.org/89753004 > > > > git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237452 0039d316-1c4b-4281-b951-d872f2087c98 > > TBR=wangxianzhu@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238234 TBR= Review URL: https://codereview.chromium.org/102003003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238442 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of https://codereview.chromium.org/99103004/wangxianzhu@chromium.org2013-12-031-2/+3
| | | | | | | | | | | | Reason for revert: Bug 323749 still unresolved TBR= NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/101543004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238424 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert 237280 "Remove TraceController""wangxianzhu@chromium.org2013-12-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6aa58b8599840160df945afa89e7482d14d1c4d4. Fixed double-close issue when ending recording. > Revert 237280 "Remove TraceController" > > Seems to have broken trace-based telemetry benchmarks on android. > > BUG=323749 > > > Remove TraceController > > > > TraceController is obsoleted by TracingController. > > Changed all remaining clients to use TracingController. > > > > BUG=none > > > > Review URL: https://codereview.chromium.org/67683003 > > TBR=wangxianzhu@chromium.org > > Review URL: https://codereview.chromium.org/89753004 > > git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237452 0039d316-1c4b-4281-b951-d872f2087c98 TBR=wangxianzhu@chromium.org Review URL: https://codereview.chromium.org/99103004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238234 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 237280 "Remove TraceController"tonyg@chromium.org2013-11-271-2/+3
| | | | | | | | | | | | | | | | | | | | | Seems to have broken trace-based telemetry benchmarks on android. BUG=323749 > Remove TraceController > > TraceController is obsoleted by TracingController. > Changed all remaining clients to use TracingController. > > BUG=none > > Review URL: https://codereview.chromium.org/67683003 TBR=wangxianzhu@chromium.org Review URL: https://codereview.chromium.org/89753004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237452 0039d316-1c4b-4281-b951-d872f2087c98
* Remove TraceControllerwangxianzhu@chromium.org2013-11-261-3/+2
| | | | | | | | | | | TraceController is obsoleted by TracingController. Changed all remaining clients to use TracingController. BUG=none Review URL: https://codereview.chromium.org/67683003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237280 0039d316-1c4b-4281-b951-d872f2087c98
* Overhaul tracing_ui to use XHR and new tracing_controllerwangxianzhu@chromium.org2013-11-211-521/+101
| | | | | | | | | | | | | Based on https://codereview.chromium.org/24355002/ Pairs with https://codereview.appspot.com/23860046/ Roll trace-viewer to r1063 to include the paired change. BUG=trace-viewer:420 Review URL: https://codereview.chromium.org/64553013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236404 0039d316-1c4b-4281-b951-d872f2087c98
* Fix trace file corruption during load in about:tracingskyostil@chromium.org2013-11-131-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user loads a trace file in about:tracing, the browser first constructs a UTF-16 string from the trace file data with control characters (\u0008), quotes (\') and backslashes (\\) escaped. This string is then sent in chunks to the renderer so that each individual piece stays under the IPC message size limit. This patch fixes three bugs in this process: 1. Characters above code point 0x7f were getting encoded as -1 (\uffff) followed by four hexadecimal digits making up the code point. Instead we now output the unsigned code point normally (e.g, \u0082). 2. The process for splitting the string into IPC message chunks did not pay attention to escape sequences. If an escape sequence was split in half, the trace data became corrupted. Now the splitting process is only done on token boundaries where a token is a single character, a single escaped character or an escaped 16-bit code point. 3. <DEL> (0x7f) is also a control character that needs to be escaped. BUG=trace-viewer:503 Review URL: https://codereview.chromium.org/68873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234813 0039d316-1c4b-4281-b951-d872f2087c98
* Fix incorrect checking of file_util::WriteFile() return results.thestig@chromium.org2013-09-171-2/+4
| | | | | | Review URL: https://chromiumcodereview.appspot.com/23865006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223723 0039d316-1c4b-4281-b951-d872f2087c98
* Move ReadFileToString to the base namespace.brettw@chromium.org2013-08-301-1/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/19579005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220612 0039d316-1c4b-4281-b951-d872f2087c98
* Generate files needed for tracing through the build.dsinclair@chromium.org2013-07-021-1/+1
| | | | | | | | | | | | | | | | Currently the about_tracing.html and about_tracing.js files are all committed into the trace-viewer repo. This causes a lot of churn. With this CL, when combined with the CL on the tracing side, we generate the needed files during the chromium build. Pairs with: https://codereview.appspot.com/9126044/ BUG=trace-viewer:152 TBR=dsinclair@chromium.org (for the grit dep) Review URL: https://chromiumcodereview.appspot.com/14990007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209777 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in content/browser/, part 2.avi@chromium.org2013-06-111-2/+2
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16625010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205435 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in content/.avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16408017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204917 0039d316-1c4b-4281-b951-d872f2087c98
* Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*"akalin@chromium.org2013-06-031-2/+2
| | | | | | | | | BUG=245942 R=avi@chromium.org Review URL: https://codereview.chromium.org/16256018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203775 0039d316-1c4b-4281-b951-d872f2087c98
* Update content/ to use scoped_refptr<T>::get() rather than implicit ↵rsleevi@chromium.org2013-06-021-3/+3
| | | | | | | | | | | | | "operator T*" Linux fixes BUG=110610 TBR=darin Review URL: https://chromiumcodereview.appspot.com/16294003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203624 0039d316-1c4b-4281-b951-d872f2087c98
* Use const_iterator while iterating const std::set<>&kouhei@chromium.org2013-05-281-1/+1
| | | | | | | | BUG=none Review URL: https://chromiumcodereview.appspot.com/15714004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202491 0039d316-1c4b-4281-b951-d872f2087c98
* Add the filename to the loaded trace file information.dsinclair@chromium.org2013-05-281-6/+14
| | | | | | | | | | | This will allow us to see the names of the loaded trace files in the trace viewer header. BUG=trace-viewer:108 Review URL: https://chromiumcodereview.appspot.com/14672019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202483 0039d316-1c4b-4281-b951-d872f2087c98
* tracing_ui.cc: fix single-quote escaping issue that causednick@chromium.org2013-05-181-6/+6
| | | | | | | | | | | | many tracing sources to be lost. R=nduca BUG=237481 TEST=collect about:tracing with "tasks" category enabled. Make sure the browser thread exists. Review URL: https://chromiumcodereview.appspot.com/14943011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200984 0039d316-1c4b-4281-b951-d872f2087c98
* tracing: Escape the backslash before appending datavmpstr@chromium.org2013-05-031-1/+6
| | | | | | | | | | | Ensure that the backslashes don't disappear by escaping them BUG=237481 NOTRY=True Review URL: https://chromiumcodereview.appspot.com/14812003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198062 0039d316-1c4b-4281-b951-d872f2087c98
* Harden about:tracing JS<->WebUI protocol for better handling of JSON errorsnduca@chromium.org2013-05-021-11/+21
| | | | | | | | | | | | | | | | | Moves all handling of JSON parsing into JS, whereas before it was handled before in JS, but under control of WebUI. This lets JS do much better error handling. Pairs with https://codereview.appspot.com/9025044, so DEP roll to past that. [CQ failures are flake] R=dsinclair,piman NOTRY=True Review URL: https://chromiumcodereview.appspot.com/14644002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197754 0039d316-1c4b-4281-b951-d872f2087c98
* Category group support/Renamings.rubentopo@gmail.com2013-04-191-1/+1
| | | | | | | | | | | | | Related review: https://codereview.chromium.org/11823016/ BUG=168284 TEST=TraceEventTestFixture.Categories, TraceEventTestFixture.CategoryFilter R=nduca Review URL: https://chromiumcodereview.appspot.com/12150004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195109 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>.erg@chromium.org2013-04-171-2/+2
| | | | | | | | | | | In r174057, ajwong@ added support for implicit testing to scoped_ptr<>. Removes these in content/. BUG=232084 Review URL: https://codereview.chromium.org/14081010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194608 0039d316-1c4b-4281-b951-d872f2087c98
* content: Move more constants into content namespace.tfarina@chromium.org2013-04-141-2/+1
| | | | | | | | R=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/13513004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194115 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-4/+10
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-10/+4
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Really fix build after r193020.dcheng@chromium.org2013-04-091-2/+2
| | | | | | | | | | | Argh. Macros are evil. BUG= TBR=darin Review URL: https://codereview.chromium.org/13937002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193029 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-4/+10
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
* Add hooks to allow retrieving the current known tracing categories.dsinclair@chromium.org2013-03-241-0/+29
| | | | | | | | | | | | | | | | | | | | | | We want to be able to select the categories to be traced before we generate the trace file. This CL exposes the needed hooks for about:tracing to query for the currently registered tracing categories. The TracingMessageHandler will listen for 'getKnownCategories' from about:tracing and, when complete, will call 'tracingController.onKnownCategoriesCollected' and pass the current categories back to about:tracing. If we are unable to perform the request to get categories we will call 'tracingController.onKnownCategoriesCollected' with an empty list of categories. BUG=191463 Review URL: https://chromiumcodereview.appspot.com/12859004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190214 0039d316-1c4b-4281-b951-d872f2087c98
* Add a mode flag to the tracing framework.dsinclair@chromium.org2013-02-231-2/+13
| | | | | | | | | | | | | | The mode is provided when SetEnabled is called. Currently there is only one mode which is the trace until buffer is full mode. We will be adding a continuous tracing mode which this will support. BUG=156025 Review URL: https://chromiumcodereview.appspot.com/12302036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184258 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove deprecated base::Value methods from contents. Use ↵thestig@chromium.org2013-02-121-15/+15
| | | | | | | | base::Value too. Review URL: https://chromiumcodereview.appspot.com/12207089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182042 0039d316-1c4b-4281-b951-d872f2087c98
* Linux/ChromeOS Chromium style checker cleanup, content/ edition.rsleevi@chromium.org2013-02-121-6/+6
| | | | | | | | | | | Automated clean up of style checker errors that were missed due to the plugin not being executed on implementation files. BUG=115047 Review URL: https://chromiumcodereview.appspot.com/12210030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181822 0039d316-1c4b-4281-b951-d872f2087c98
* Rename FilePath to base::FilePath and use new location of ↵brettw@chromium.org2013-02-081-1/+1
| | | | | | | | string_number_conversions in some chrome subdirectories. Review URL: https://codereview.chromium.org/12218065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181564 0039d316-1c4b-4281-b951-d872f2087c98
* Use base namespace for FilePath in content/browserbrettw@chromium.org2013-02-071-6/+8
| | | | | | Review URL: https://codereview.chromium.org/12213066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181349 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IDS_TRACING_TITLE, the usage of this was removed in r129123.jam@chromium.org2013-02-041-1/+0
| | | | | | | BUG=169170,173885 Review URL: https://codereview.chromium.org/12185009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180347 0039d316-1c4b-4281-b951-d872f2087c98
* undelete content/browser/tracingjam@chromium.org2013-02-031-0/+492
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180287 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 180055: Very likely caused http://crbug.com/173885thakis@chromium.org2013-02-031-492/+0
| | | | | | | | | | | | > Moving chrome://tracing to content. > > BUG=169170 > Review URL: https://codereview.chromium.org/12088099 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/12194007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180282 0039d316-1c4b-4281-b951-d872f2087c98
* Moving chrome://tracing to content.jam@chromium.org2013-02-011-0/+492
BUG=169170 Review URL: https://codereview.chromium.org/12088099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180055 0039d316-1c4b-4281-b951-d872f2087c98