Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Issue 106353005: Expose performance.memory in workers (Closed)

Created:
6 years, 12 months ago by Pan
Modified:
5 years, 12 months ago
CC:
blink-reviews, RyanS, komoroske
Base URL:
https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Visibility:
Public.

Description

Expose performance.memory in workers, runtimeEnabledFeatures is used to control if real or quantized heap size info will be returned. BUG=326370 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173450

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 5

Patch Set 3 : Introduce WorkerSettings #

Total comments: 12

Patch Set 4 : #

Total comments: 13

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Total comments: 9

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Total comments: 6

Patch Set 9 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -18 lines) Patch
A LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html View 1 2 3 4 5 6 1 chunk +46 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker-expected.txt View 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/misc/performance-memory-in-shared-worker.html View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/misc/performance-memory-in-shared-worker-expected.txt View 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M PerformanceTests/resources/runner.js View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/frame/Console.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/Settings.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/Settings.in View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/timing/MemoryInfo.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -5 lines 0 comments Download
M Source/core/timing/MemoryInfo.cpp View 1 2 3 4 5 6 7 3 chunks +3 lines, -6 lines 1 comment Download
M Source/core/timing/Performance.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/performance/WorkerPerformance.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M Source/modules/performance/WorkerPerformance.cpp View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M Source/modules/performance/WorkerPerformance.idl View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 47 (1 generated)
pan deng
please review :) thanks Pan
6 years, 12 months ago (2013-12-27 03:06:00 UTC) #1
pan deng
please review :) thanks Pan
6 years, 12 months ago (2013-12-27 03:06:03 UTC) #2
tonyg
I'm not a great reviewer for this change and simonjam is working on another project ...
6 years, 11 months ago (2014-01-07 01:47:37 UTC) #3
abarth-chromium
https://codereview.chromium.org/106353005/diff/1/Source/core/workers/DedicatedWorkerGlobalScope.h File Source/core/workers/DedicatedWorkerGlobalScope.h (right): https://codereview.chromium.org/106353005/diff/1/Source/core/workers/DedicatedWorkerGlobalScope.h#newcode46 Source/core/workers/DedicatedWorkerGlobalScope.h:46: static PassRefPtr<DedicatedWorkerGlobalScope> create(DedicatedWorkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin, bool memoryInfoEnabled); It's ...
6 years, 11 months ago (2014-01-07 06:59:16 UTC) #4
Pan
https://codereview.chromium.org/106353005/diff/1/Source/core/workers/DedicatedWorkerGlobalScope.h File Source/core/workers/DedicatedWorkerGlobalScope.h (right): https://codereview.chromium.org/106353005/diff/1/Source/core/workers/DedicatedWorkerGlobalScope.h#newcode46 Source/core/workers/DedicatedWorkerGlobalScope.h:46: static PassRefPtr<DedicatedWorkerGlobalScope> create(DedicatedWorkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin, bool memoryInfoEnabled); On ...
6 years, 11 months ago (2014-01-07 09:30:58 UTC) #5
abarth-chromium
On 2014/01/07 09:30:58, Pan wrote: > https://codereview.chromium.org/106353005/diff/1/Source/core/workers/DedicatedWorkerGlobalScope.h > File Source/core/workers/DedicatedWorkerGlobalScope.h (right): > > https://codereview.chromium.org/106353005/diff/1/Source/core/workers/DedicatedWorkerGlobalScope.h#newcode46 > ...
6 years, 11 months ago (2014-01-07 16:06:54 UTC) #6
Pan
thanks @abarth, Hi @adamk, To make dedicated worker aware the settings (which is from chrome ...
6 years, 10 months ago (2014-02-26 10:39:58 UTC) #7
adamk
On 2014/02/26 10:39:58, Pan wrote: > thanks @abarth, > > Hi @adamk, > > To ...
6 years, 10 months ago (2014-02-27 00:56:50 UTC) #8
Pan
> Seems reasonable to pass the appropriate switches to the shared worker process; > kinuko ...
6 years, 9 months ago (2014-02-27 14:26:49 UTC) #9
kinuko
Could we split this code into two, one for WorkerSettings plumbing and the other for ...
6 years, 9 months ago (2014-02-28 05:23:28 UTC) #10
Pan
https://codereview.chromium.org/106353005/diff/250001/public/web/WebSharedWorkerClient.h File public/web/WebSharedWorkerClient.h (right): https://codereview.chromium.org/106353005/diff/250001/public/web/WebSharedWorkerClient.h#newcode56 public/web/WebSharedWorkerClient.h:56: virtual bool enableMemoryInfo() { return false; } On 2014/02/28 ...
6 years, 9 months ago (2014-02-28 07:38:39 UTC) #11
kinuko
> https://codereview.chromium.org/106353005/diff/250001/public/web/WebSharedWorkerClient.h#newcode56 > public/web/WebSharedWorkerClient.h:56: virtual bool enableMemoryInfo() { return > false; } > On 2014/02/28 ...
6 years, 9 months ago (2014-02-28 10:23:42 UTC) #12
Pan
On 2014/02/28 10:23:42, kinuko wrote: > > > https://codereview.chromium.org/106353005/diff/250001/public/web/WebSharedWorkerClient.h#newcode56 > > public/web/WebSharedWorkerClient.h:56: virtual bool enableMemoryInfo() ...
6 years, 9 months ago (2014-02-28 12:13:04 UTC) #13
Pan
Hi kinuko, ready to review, thanks! Pan https://codereview.chromium.org/106353005/diff/250001/Source/core/workers/WorkerThread.h File Source/core/workers/WorkerThread.h (right): https://codereview.chromium.org/106353005/diff/250001/Source/core/workers/WorkerThread.h#newcode104 Source/core/workers/WorkerThread.h:104: OwnPtr<WorkerSettings> m_settings; ...
6 years, 9 months ago (2014-03-03 09:16:51 UTC) #14
kinuko
https://codereview.chromium.org/106353005/diff/270001/Source/core/workers/WorkerGlobalScope.h File Source/core/workers/WorkerGlobalScope.h (right): https://codereview.chromium.org/106353005/diff/270001/Source/core/workers/WorkerGlobalScope.h#newcode147 Source/core/workers/WorkerGlobalScope.h:147: WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, double timeOrigin, PassOwnPtr<WorkerClients>, ...
6 years, 9 months ago (2014-03-04 04:34:35 UTC) #15
Pan
Hi @kinuko, please review. thanks Pan https://codereview.chromium.org/106353005/diff/270001/Source/core/workers/WorkerGlobalScope.h File Source/core/workers/WorkerGlobalScope.h (right): https://codereview.chromium.org/106353005/diff/270001/Source/core/workers/WorkerGlobalScope.h#newcode147 Source/core/workers/WorkerGlobalScope.h:147: WorkerGlobalScope(const KURL&, const ...
6 years, 9 months ago (2014-03-06 08:50:55 UTC) #16
kinuko
lgtm modulo some nits. (It'd be better to start asking API owners to review public ...
6 years, 9 months ago (2014-03-10 05:55:51 UTC) #17
Pan
https://codereview.chromium.org/106353005/diff/330001/Source/web/WebWorkerSettings.cpp File Source/web/WebWorkerSettings.cpp (right): https://codereview.chromium.org/106353005/diff/330001/Source/web/WebWorkerSettings.cpp#newcode43 Source/web/WebWorkerSettings.cpp:43: settings->setMemoryInfoEnabled(m_private->memoryInfoEnabled()); On 2014/03/10 05:55:52, kinuko wrote: > m_private itself ...
6 years, 9 months ago (2014-03-10 12:27:52 UTC) #18
kinuko
https://codereview.chromium.org/106353005/diff/330001/Source/core/workers/WorkerSettings.h File Source/core/workers/WorkerSettings.h (right): https://codereview.chromium.org/106353005/diff/330001/Source/core/workers/WorkerSettings.h#newcode2 Source/core/workers/WorkerSettings.h:2: * Copyright (C) 2014 Intel Corporation. All rights reserved. ...
6 years, 9 months ago (2014-03-10 13:50:40 UTC) #19
abarth-chromium
https://codereview.chromium.org/106353005/diff/330001/public/web/WebSharedWorker.h File public/web/WebSharedWorker.h (right): https://codereview.chromium.org/106353005/diff/330001/public/web/WebSharedWorker.h#newcode60 public/web/WebSharedWorker.h:60: const WebWorkerSettings& = WebWorkerSettings::create()) = 0; This function is ...
6 years, 9 months ago (2014-03-10 21:32:36 UTC) #20
abarth-chromium
https://codereview.chromium.org/106353005/diff/330001/public/web/WebWorkerSettings.h File public/web/WebWorkerSettings.h (right): https://codereview.chromium.org/106353005/diff/330001/public/web/WebWorkerSettings.h#newcode39 public/web/WebWorkerSettings.h:39: BLINK_EXPORT void setMemoryInfoEnabled(bool); If this maps to a command-line ...
6 years, 9 months ago (2014-03-10 21:33:28 UTC) #21
Pan
On 2014/03/10 21:33:28, abarth wrote: > https://codereview.chromium.org/106353005/diff/330001/public/web/WebWorkerSettings.h > File public/web/WebWorkerSettings.h (right): > > https://codereview.chromium.org/106353005/diff/330001/public/web/WebWorkerSettings.h#newcode39 > ...
6 years, 9 months ago (2014-03-20 13:10:15 UTC) #22
sof
https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js File LayoutTests/http/tests/w3c/webperf/resources/worker.js (right): https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js#newcode16 LayoutTests/http/tests/w3c/webperf/resources/worker.js:16: postMessage(JSON.stringify(results)); why do we need to indirect via JSON ...
6 years, 9 months ago (2014-03-20 20:19:12 UTC) #23
Pan
https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js File LayoutTests/http/tests/w3c/webperf/resources/worker.js (right): https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js#newcode16 LayoutTests/http/tests/w3c/webperf/resources/worker.js:16: postMessage(JSON.stringify(results)); On 2014/03/20 20:19:12, sof wrote: > why do ...
6 years, 9 months ago (2014-03-24 07:31:18 UTC) #24
Pan
@kinuko, patchset 6 shows the RuntimeEnabledFeatures way, I think it is ok, as once browser ...
6 years, 9 months ago (2014-03-24 07:38:29 UTC) #25
sof
https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js File LayoutTests/http/tests/w3c/webperf/resources/worker.js (right): https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js#newcode16 LayoutTests/http/tests/w3c/webperf/resources/worker.js:16: postMessage(JSON.stringify(results)); On 2014/03/24 07:31:18, Pan wrote: > On 2014/03/20 ...
6 years, 9 months ago (2014-03-24 07:38:38 UTC) #26
Pan
https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js File LayoutTests/http/tests/w3c/webperf/resources/worker.js (right): https://codereview.chromium.org/106353005/diff/350001/LayoutTests/http/tests/w3c/webperf/resources/worker.js#newcode16 LayoutTests/http/tests/w3c/webperf/resources/worker.js:16: postMessage(JSON.stringify(results)); > > It's a bit stronger than that, ...
6 years, 9 months ago (2014-03-24 07:45:42 UTC) #27
sof
https://codereview.chromium.org/106353005/diff/370001/LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html File LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html (right): https://codereview.chromium.org/106353005/diff/370001/LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html#newcode16 LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html:16: 'self.performance.memory;', Change this to 'JSON.stringify(self.performance.memory);' https://codereview.chromium.org/106353005/diff/370001/LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html#newcode23 LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html:23: var jsHeap ...
6 years, 9 months ago (2014-03-24 07:54:43 UTC) #28
Pan
On 2014/03/24 07:54:43, sof wrote: > https://codereview.chromium.org/106353005/diff/370001/LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html > File LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html > (right): > > https://codereview.chromium.org/106353005/diff/370001/LayoutTests/http/tests/misc/performance-memory-in-dedicated-worker.html#newcode16 ...
6 years, 9 months ago (2014-03-25 07:00:09 UTC) #29
sof
On 2014/03/25 07:00:09, Pan wrote: .. > https://codereview.chromium.org/106353005/diff/370001/LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-shared-basic.html#newcode35 > > > LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-shared-basic.html:35: > > var ...
6 years, 9 months ago (2014-03-25 07:08:33 UTC) #30
kinuko
lgtm2, sorry for my very slow response. I'm glad that we could switch to the ...
6 years, 9 months ago (2014-03-25 07:51:27 UTC) #31
Pan
On 2014/03/25 07:51:27, kinuko wrote: > lgtm2, sorry for my very slow response. I'm glad ...
6 years, 9 months ago (2014-03-25 12:46:55 UTC) #32
Pan
Hi @abarth, could you please to help review this change? thanks Pan
6 years, 9 months ago (2014-03-28 14:29:08 UTC) #33
abarth-chromium
Don't you neat to land this in stages where you first add the public API ...
6 years, 9 months ago (2014-03-28 17:38:46 UTC) #34
Pan
Hi @abarth, @tonyg, We have make the changes of web API and introduce switches in ...
6 years, 8 months ago (2014-04-23 14:26:56 UTC) #35
abarth-chromium
https://codereview.chromium.org/106353005/diff/450001/Source/core/frame/Settings.cpp File Source/core/frame/Settings.cpp (right): https://codereview.chromium.org/106353005/diff/450001/Source/core/frame/Settings.cpp#newcode143 Source/core/frame/Settings.cpp:143: } This is incorrect. The Settings system and the ...
6 years, 8 months ago (2014-04-23 18:04:37 UTC) #36
Pan
https://codereview.chromium.org/106353005/diff/450001/Source/core/frame/Settings.cpp File Source/core/frame/Settings.cpp (right): https://codereview.chromium.org/106353005/diff/450001/Source/core/frame/Settings.cpp#newcode143 Source/core/frame/Settings.cpp:143: } On 2014/04/23 18:04:37, abarth wrote: > This is ...
6 years, 8 months ago (2014-04-24 00:22:27 UTC) #37
abarth-chromium
Presumably perf tests can use a command line flag to trigger this runtime-enabled feature.
6 years, 8 months ago (2014-04-24 14:42:54 UTC) #38
Pan
On 2014/04/24 14:42:54, abarth wrote: > Presumably perf tests can use a command line flag ...
6 years, 7 months ago (2014-04-28 13:25:00 UTC) #39
abarth-chromium
On 2014/04/28 13:25:00, Pan wrote: > Any idea? Sounds right to me.
6 years, 7 months ago (2014-04-28 17:40:08 UTC) #40
Pan
Hi @abarth, @tonyg Dependencies were clear, this change is ready I think. PTAL. thanks Pan ...
6 years, 7 months ago (2014-05-06 14:24:24 UTC) #41
abarth-chromium
lgtm
6 years, 7 months ago (2014-05-06 17:46:01 UTC) #42
Pan
The CQ bit was checked by pan.deng@intel.com
6 years, 7 months ago (2014-05-06 23:39:17 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pan.deng@intel.com/106353005/490001
6 years, 7 months ago (2014-05-06 23:40:13 UTC) #44
commit-bot: I haz the power
Change committed as 173450
6 years, 7 months ago (2014-05-07 00:13:53 UTC) #45
yurys
5 years, 12 months ago (2014-12-24 08:23:30 UTC) #47
Message was sent while issue was closed.
https://codereview.chromium.org/106353005/diff/490001/Source/core/timing/Memo...
File Source/core/timing/MemoryInfo.cpp (right):

https://codereview.chromium.org/106353005/diff/490001/Source/core/timing/Memo...
Source/core/timing/MemoryInfo.cpp:140: DEFINE_STATIC_LOCAL(HeapSizeCache,
heapSizeCache, ());
HeapSizeCache should become thread-local as it now can be accessed from worker
threads as well as from the main one. I opened a bug on this: crbung.com/445007

Powered by Google App Engine
This is Rietveld 408576698