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

Side by Side Diff: tracing/tracing/metrics/system_health/memory_metric_test.html

Issue 2169873002: [system-health] Track amount of peak malloced memory in V8. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 <link rel="import" href="/tracing/base/range.html"> 9 <link rel="import" href="/tracing/base/range.html">
10 <link rel="import" href="/tracing/core/test_utils.html"> 10 <link rel="import" href="/tracing/core/test_utils.html">
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 var partitionAllocDump = 364 var partitionAllocDump =
365 newAllocatorDump(pmdRendererA2, 'partition_alloc'); 365 newAllocatorDump(pmdRendererA2, 'partition_alloc');
366 addOwnershipLink( 366 addOwnershipLink(
367 addChildDump(partitionAllocDump, 'allocated_objects', 367 addChildDump(partitionAllocDump, 'allocated_objects',
368 {numerics: {size: 320}}), 368 {numerics: {size: 320}}),
369 addChildDump(partitionAllocDump, 'partitions', 369 addChildDump(partitionAllocDump, 'partitions',
370 {numerics: {size: 240}})); 370 {numerics: {size: 240}}));
371 var v8Dump = newAllocatorDump(pmdRendererA2, 'v8', 371 var v8Dump = newAllocatorDump(pmdRendererA2, 'v8',
372 {numerics: {size: 650}}); 372 {numerics: {size: 650}});
373 var isolateDumpA = addChildDump(v8Dump, 'isolate_A'); 373 var isolateDumpA = addChildDump(v8Dump, 'isolate_A');
374 addChildDump(isolateDumpA, 'malloc', {numerics: {size: 1 }}); 374 addChildDump(isolateDumpA, 'malloc', {numerics: {
petrcermak 2016/07/21 13:11:49 Could you also add one isolate with only "size" an
ulan 2016/07/21 13:47:07 Done.
375 size: 1,
376 peak_size: 2
377 }});
375 var isolateDumpB = addChildDump(v8Dump, 'isolate_B'); 378 var isolateDumpB = addChildDump(v8Dump, 'isolate_B');
376 addChildDump(isolateDumpB, 'malloc', {numerics: {size: 10 }}); 379 addChildDump(isolateDumpB, 'malloc', {numerics: {
380 size: 10,
381 peak_size: 20
382 }});
377 return [partitionAllocDump, v8Dump]; 383 return [partitionAllocDump, v8Dump];
378 })(); 384 })();
379 var pmdRendererB2 = addProcessMemoryDump(gmd2, pRendererB, {ts: 40}); 385 var pmdRendererB2 = addProcessMemoryDump(gmd2, pRendererB, {ts: 40});
380 pmdRendererB2.memoryAllocatorDumps = [ 386 pmdRendererB2.memoryAllocatorDumps = [
381 newAllocatorDump(pmdRendererB2, 'v8', {numerics: { 387 newAllocatorDump(pmdRendererB2, 'v8', {numerics: {
382 size: 970, 388 size: 970,
383 allocated_objects_size: 860 389 allocated_objects_size: 860
384 }}), 390 }}),
385 newAllocatorDump(pmdRendererB2, 'malloc', 391 newAllocatorDump(pmdRendererB2, 'malloc',
386 {numerics: {allocated_objects_size: 750}}) 392 {numerics: {allocated_objects_size: 750}})
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 unit: sizeInBytes_smallerIsBetter, 505 unit: sizeInBytes_smallerIsBetter,
500 description: 'effective size of tracing in all processes in Chrome' 506 description: 'effective size of tracing in all processes in Chrome'
501 }, 507 },
502 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_by_malloc:effec tive_size': 508 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_by_malloc:effec tive_size':
503 { 509 {
504 value: [0, 1 + 10, 0, 0], 510 value: [0, 1 + 10, 0, 0],
505 unit: sizeInBytes_smallerIsBetter, 511 unit: sizeInBytes_smallerIsBetter,
506 description: 'effective size of objects allocated by malloc for v8 ' + 512 description: 'effective size of objects allocated by malloc for v8 ' +
507 'in all processes in Chrome' 513 'in all processes in Chrome'
508 }, 514 },
515 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_by_malloc:peak_ size':
516 {
517 value: [0, 2 + 20, 0, 0],
518 unit: sizeInBytes_smallerIsBetter,
519 description: 'peak size of objects allocated by malloc for v8 ' +
520 'in all processes in Chrome'
521 },
509 'memory:chrome:all_processes:reported_by_chrome:v8:effective_size': { 522 'memory:chrome:all_processes:reported_by_chrome:v8:effective_size': {
510 value: [0, 650 + 970 + 111, 0, 4e5], 523 value: [0, 650 + 970 + 111, 0, 4e5],
511 unit: sizeInBytes_smallerIsBetter, 524 unit: sizeInBytes_smallerIsBetter,
512 description: 'effective size of v8 in all processes in Chrome' 525 description: 'effective size of v8 in all processes in Chrome'
513 }, 526 },
514 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_objects_size': 527 'memory:chrome:all_processes:reported_by_chrome:v8:allocated_objects_size':
515 { 528 {
516 value: [0, 860, 0, 0], 529 value: [0, 860, 0, 0],
517 unit: sizeInBytes_smallerIsBetter, 530 unit: sizeInBytes_smallerIsBetter,
518 description: 'size of all objects allocated by v8 in all processes ' + 531 description: 'size of all objects allocated by v8 in all processes ' +
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 description: 'effective size of partition_alloc in renderer ' + 633 description: 'effective size of partition_alloc in renderer ' +
621 'processes in Chrome' 634 'processes in Chrome'
622 }, 635 },
623 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_by_malloc: effective_size': 636 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_by_malloc: effective_size':
624 { 637 {
625 value: [0, 1 + 10, 0, 0], 638 value: [0, 1 + 10, 0, 0],
626 unit: sizeInBytes_smallerIsBetter, 639 unit: sizeInBytes_smallerIsBetter,
627 description: 'effective size of objects allocated by malloc for v8 ' + 640 description: 'effective size of objects allocated by malloc for v8 ' +
628 'in renderer processes in Chrome' 641 'in renderer processes in Chrome'
629 }, 642 },
643 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_by_malloc: peak_size':
644 {
645 value: [0, 2 + 20, 0, 0],
646 unit: sizeInBytes_smallerIsBetter,
647 description: 'peak size of objects allocated by malloc for v8 ' +
648 'in renderer processes in Chrome'
649 },
630 'memory:chrome:renderer_processes:reported_by_chrome:v8:effective_size': { 650 'memory:chrome:renderer_processes:reported_by_chrome:v8:effective_size': {
631 value: [0, 650 + 970, 0, 4e5], 651 value: [0, 650 + 970, 0, 4e5],
632 unit: sizeInBytes_smallerIsBetter, 652 unit: sizeInBytes_smallerIsBetter,
633 description: 'effective size of v8 in renderer processes in Chrome' 653 description: 'effective size of v8 in renderer processes in Chrome'
634 }, 654 },
635 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_objects_si ze': 655 'memory:chrome:renderer_processes:reported_by_chrome:v8:allocated_objects_si ze':
636 { 656 {
637 value: [0, 860, 0, 0], 657 value: [0, 860, 0, 0],
638 unit: sizeInBytes_smallerIsBetter, 658 unit: sizeInBytes_smallerIsBetter,
639 description: 'size of all objects allocated by v8 in renderer ' + 659 description: 'size of all objects allocated by v8 in renderer ' +
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 var pmdBrowser6 = addProcessMemoryDump(gmd6, pWebView, {ts: 50}); 1476 var pmdBrowser6 = addProcessMemoryDump(gmd6, pWebView, {ts: 50});
1457 pmdBrowser6.memoryAllocatorDumps = (function() { 1477 pmdBrowser6.memoryAllocatorDumps = (function() {
1458 var mallocDump = newAllocatorDump(pmdBrowser6, 'malloc', 1478 var mallocDump = newAllocatorDump(pmdBrowser6, 'malloc',
1459 {numerics: {size: 16384}}); 1479 {numerics: {size: 16384}});
1460 var v8Dump = newAllocatorDump(pmdBrowser6, 'v8', {numerics: { 1480 var v8Dump = newAllocatorDump(pmdBrowser6, 'v8', {numerics: {
1461 allocated_objects_size: 32768, 1481 allocated_objects_size: 32768,
1462 code_and_metadata_size: 33554432, 1482 code_and_metadata_size: 33554432,
1463 size: 67108864 1483 size: 67108864
1464 }}); 1484 }});
1465 var isolateDump = addChildDump(v8Dump, 'isolate'); 1485 var isolateDump = addChildDump(v8Dump, 'isolate');
1466 addChildDump(isolateDump, 'malloc', {numerics: {size: 1 }}); 1486 addChildDump(isolateDump, 'malloc', {numerics: {
1487 size: 1,
1488 peak_size: 2
1489 }});
1467 return [mallocDump, v8Dump]; 1490 return [mallocDump, v8Dump];
1468 })(); 1491 })();
1469 pmdBrowser6.vmRegions = VMRegionClassificationNode.fromRegions([ 1492 pmdBrowser6.vmRegions = VMRegionClassificationNode.fromRegions([
1470 new VMRegion(0xABCD, 99999, 0, '/dev/ashmem/dalvik-non moving space', 1493 new VMRegion(0xABCD, 99999, 0, '/dev/ashmem/dalvik-non moving space',
1471 {privateDirtyResident: 65536}) 1494 {privateDirtyResident: 65536})
1472 ]); 1495 ]);
1473 1496
1474 // Timestamp 7 (Chrome 1 + GPU Process). 1497 // Timestamp 7 (Chrome 1 + GPU Process).
1475 var gmd7 = addGlobalMemoryDump(model, {ts: 60, levelOfDetail: DETAILED}); 1498 var gmd7 = addGlobalMemoryDump(model, {ts: 60, levelOfDetail: DETAILED});
1476 var pmdBrowser7 = addProcessMemoryDump(gmd7, pChrome1, {ts: 63}); 1499 var pmdBrowser7 = addProcessMemoryDump(gmd7, pChrome1, {ts: 63});
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 unit: sizeInBytes_smallerIsBetter, 1561 unit: sizeInBytes_smallerIsBetter,
1539 description: 'effective size of malloc in all processes in WebView' 1562 description: 'effective size of malloc in all processes in WebView'
1540 }, 1563 },
1541 'memory:webview:all_processes:reported_by_chrome:v8:allocated_by_malloc:effe ctive_size': 1564 'memory:webview:all_processes:reported_by_chrome:v8:allocated_by_malloc:effe ctive_size':
1542 { 1565 {
1543 value: [0, 1], 1566 value: [0, 1],
1544 unit: sizeInBytes_smallerIsBetter, 1567 unit: sizeInBytes_smallerIsBetter,
1545 description: 'effective size of objects allocated by malloc for v8 ' + 1568 description: 'effective size of objects allocated by malloc for v8 ' +
1546 'in all processes in WebView' 1569 'in all processes in WebView'
1547 }, 1570 },
1571 'memory:webview:all_processes:reported_by_chrome:v8:allocated_by_malloc:peak _size':
1572 {
1573 value: [0, 2],
1574 unit: sizeInBytes_smallerIsBetter,
1575 description: 'peak size of objects allocated by malloc for v8 ' +
1576 'in all processes in WebView'
1577 },
1548 'memory:webview:all_processes:reported_by_chrome:v8:effective_size': { 1578 'memory:webview:all_processes:reported_by_chrome:v8:effective_size': {
1549 value: [4, 67108864], 1579 value: [4, 67108864],
1550 unit: sizeInBytes_smallerIsBetter, 1580 unit: sizeInBytes_smallerIsBetter,
1551 description: 'effective size of v8 in all processes in WebView' 1581 description: 'effective size of v8 in all processes in WebView'
1552 }, 1582 },
1553 'memory:webview:all_processes:reported_by_chrome:v8:code_and_metadata_size': 1583 'memory:webview:all_processes:reported_by_chrome:v8:code_and_metadata_size':
1554 { 1584 {
1555 value: [33554432], 1585 value: [33554432],
1556 unit: sizeInBytes_smallerIsBetter, 1586 unit: sizeInBytes_smallerIsBetter,
1557 description: 'size of v8 code and metadata in all processes in ' + 1587 description: 'size of v8 code and metadata in all processes in ' +
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 unit: sizeInBytes_smallerIsBetter, 1692 unit: sizeInBytes_smallerIsBetter,
1663 description: 'effective size of malloc in the browser process in WebView' 1693 description: 'effective size of malloc in the browser process in WebView'
1664 }, 1694 },
1665 'memory:webview:browser_process:reported_by_chrome:v8:allocated_by_malloc:ef fective_size': 1695 'memory:webview:browser_process:reported_by_chrome:v8:allocated_by_malloc:ef fective_size':
1666 { 1696 {
1667 value: [0, 1], 1697 value: [0, 1],
1668 unit: sizeInBytes_smallerIsBetter, 1698 unit: sizeInBytes_smallerIsBetter,
1669 description: 'effective size of objects allocated by malloc for v8 ' + 1699 description: 'effective size of objects allocated by malloc for v8 ' +
1670 'in the browser process in WebView' 1700 'in the browser process in WebView'
1671 }, 1701 },
1702 'memory:webview:browser_process:reported_by_chrome:v8:allocated_by_malloc:pe ak_size':
1703 {
1704 value: [0, 2],
1705 unit: sizeInBytes_smallerIsBetter,
1706 description: 'peak size of objects allocated by malloc for v8 ' +
1707 'in the browser process in WebView'
1708 },
1672 'memory:webview:browser_process:reported_by_chrome:v8:effective_size': { 1709 'memory:webview:browser_process:reported_by_chrome:v8:effective_size': {
1673 value: [4, 67108864], 1710 value: [4, 67108864],
1674 unit: sizeInBytes_smallerIsBetter, 1711 unit: sizeInBytes_smallerIsBetter,
1675 description: 'effective size of v8 in the browser process in WebView' 1712 description: 'effective size of v8 in the browser process in WebView'
1676 }, 1713 },
1677 'memory:webview:browser_process:reported_by_chrome:v8:allocated_objects_size ': 1714 'memory:webview:browser_process:reported_by_chrome:v8:allocated_objects_size ':
1678 { 1715 {
1679 value: [0, 32768], 1716 value: [0, 32768],
1680 unit: sizeInBytes_smallerIsBetter, 1717 unit: sizeInBytes_smallerIsBetter,
1681 description: 'size of all objects allocated by v8 in the browser ' + 1718 description: 'size of all objects allocated by v8 in the browser ' +
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 addProcessMemoryDump(gmd, pChrome, {ts: 11}); 2798 addProcessMemoryDump(gmd, pChrome, {ts: 11});
2762 }); 2799 });
2763 var values = new tr.v.ValueSet(); 2800 var values = new tr.v.ValueSet();
2764 2801
2765 assert.throws(function() { 2802 assert.throws(function() {
2766 tr.metrics.sh.memoryMetric(values, model); 2803 tr.metrics.sh.memoryMetric(values, model);
2767 }, 'Memory dump ID clash across multiple browsers with PIDs: 1 and 2'); 2804 }, 'Memory dump ID clash across multiple browsers with PIDs: 1 and 2');
2768 }); 2805 });
2769 }); 2806 });
2770 </script> 2807 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698