1 of 181

Day 1

2 of 181

Lightning talks!!

haraken@

2019 Apr

(๑>ᴗ<๑)

*

*

*

*

3 of 181

4 of 181

Rule

5 of 181

  • I asked all speakers to insert one talking point that will get a storm of applause

  • When you find that point, please give a big round of applause :D

6 of 181

Let's practice!

7 of 181

It's important to improve

documentation of the code base

8 of 181

50% increase!!

9 of 181

SGTM

(๑˃̵ᴗ˂̵)و

10 of 181

Media Capture�for the Web

BlinkOn 10, April 8, 2019

Rijubrata Bhaumik @riju

{ Generic Sensors, Web NFC, MediaCapture .. }

11 of 181

Web Media Capture

11

Capturing images used to be painful

Then we shipped Image Capture API in M59

Problem solved?

12 of 181

But … we heard you need a more capable API!

12

12

navigator.mediaDevices

.getUserMedia({video: true}) …

videoTrack.applyConstraints({

advanced: [{

focusMode: "manual",

focusDistance: 5

}]

});

13 of 181

For those compelling real-world u$e ca$e$

13

13

Focus Stacking

Remove defocused objects & background

Depth estimation in Augmented Reality

… and more

14 of 181

Then we saw the light

14

navigator.mediaDevices

.getUserMedia({video: true}) …

videoTrack.applyConstraints({

advanced: [{

exposureMode: "manual",

exposureTime: 50

}]

});

15 of 181

15

15

Well, there’s also that High Dynamic Range thing...

-4 stops

-2 stops

+2 stops

+4 stops

Tone-mapped HDR image

16 of 181

Also, we heard y’all like video conferencing too?!

16

17 of 181

Media capture in depth? We have you covered!

17

18 of 181

Demos in depth

18

18

19 of 181

(Thank You!)

mcasas, reillyg, guidou, chfremer, astojilj, slightlyoff, anssiko .. and many many more

19

20 of 181

21 of 181

Oilpan: Concurrent Marking

BlinkOn 10, Toronto, Apr 2019

hpayer@, mlippautz@

2019 Q2++

22 of 181

Motivation

2018-Q3: Latency-aware garbage collection through incremental marking

2019-Q1: Sane architecture across V8 and Blink w/ unified heap

Marking speed =

processed bytes

time spent on main thread

V8

dynamic language (JS)

concurrent marking

0.37 MB/ms

Oilpan

static language (C++)

incremental marking

0.19 MB/ms

(UMA; 99%-ile)

23 of 181

Marking (incrementally)

  • Transitively visiting all children of live objects
  • Bounded by live memory

time

main thread

Start

Finish

App

Step

App

Step

Step

24 of 181

Concurrent marking

  • Transitively visiting all children of live objects
  • Bounded by live memory

marking helper

Step

Step

Step

time

main thread

Start

Finish

App

App

25 of 181

Knock knock

Race condition

Who’s there?

▯▯▯segmentation fault

marking helper

Step

time

main thread

App

Step

App

26 of 181

Knock knock

Race condition

Who’s there?

▯▯▯segmentation fault

  • TSAN-aware
  • C++11 memory model
  • Read-only concurrency on object payload
  • Completely transparent; no user-facing changes

27 of 181

CPU Profiling: The silent killer

Peter Marshall - V8 Tools & Embedders

Confidential + Proprietary

Confidential + Proprietary

28 of 181

96%

Reduction of peak memory overhead from 32.2 MiB to ~1 MiB

Confidential + Proprietary

29 of 181

2B+

Number of future users of the CPU Profiler

https://github.com/WICG/js-self-profiling

Confidential + Proprietary

30 of 181

Keep GCC running

2019 update

LG Electronics, Inc.

Jose Dapena Paz <jdapena@igalia.com> <jose.dapena@lge.com>

31 of 181

Chromium & GCC

  • People still use GCC
      • Platform specific toolchains.
      • Still not ready to move to Clang.
  • ...and platform c++ library:
      • ABI incompatibility.
      • System c++ libraries required.
  • Build breaks unexpectedly
      • Different interpretation of new C++ standards in GCC vs Clang.
      • Subtle differences in glibc/libstdc++.
      • Bugs in any of the different components.

32 of 181

What we are doing at LG Electronics

  • Yocto build of Chromium
      • Updated to Thud in march.
      • use_clang=false. Using GCC 8.
      • use_custom_libcxx=false. Libstdc++
      • Building with Jumbo
      • Hardware targets: Raspberry pi 3 (from march testing both arm32 and 64).
      • https://github.com/lgsvl/meta-lgsvl-browser
  • Bugfixing
      • Testing x11 and ozone wayland builds
      • Daily build.

33 of 181

Status

  • Several months stalled, ...

34 of 181

Status

  • Several months stalled, …
  • But…

WORKING AND MAINTAINED AGAIN

(since 2 weeks ago!)

35 of 181

Thanks

Several efforts, helping with keeping GCC easy to build… Intel, Igalia, LG…

Thanks!

36 of 181

JavaScript Ecosystem

hablich@chromium.org - BlinkOn 10 Lightning Talk

37 of 181

Developer numbers

The estimated number of JavaScript developers world-wide is 10.7M, and it's also the fastest growing community with 3M new developers in just the last year [1].

[1] Developer Economics: State of the Developer Nation (15th Edition)

Graph copied from Developer Economics report - picture taken from report

38 of 181

What about B2B?

57 % of enterprise developers are using JavaScript in their job

[2] Cloud Foundry Foundation Top Languages for Enterprise Application Development 2018 - picture taken from the report

39 of 181

The number one criteria for choice of a programming language is the availability of libraries [3],

and JavaScript has by far the largest number of libraries available with over 650.000 packages [4].

[3] Empirical Analysis of Programming Language Adoption, Princeton, 2013

[4] State of the Union: npm

40 of 181

JavaScript is pervasive, it is popular on servers, edge networks, desktop and IoT.

41 of 181

Or because it is the only language that is supported by browsers. *

* Terms and conditions apply, might change with WebAssembly

42 of 181

Call to action!

Invest in JavaScript Coins now!

Hockey stick growth guaranteed!*

* The guarantee is in a state of volatility. Actually, there is no guarantee.

43 of 181

The End

44 of 181

thread text rendering

a story by fserb@

45 of 181

WhatWG HTML Spec in 2017

46 of 181

WhatWG HTML Spec in 2017

47 of 181

*record scratch*

*freeze frame*

Yep, that’s me. You’re probably wondering how I ended up in this situation.

48 of 181

Can we make text rendering

thread safe in Blink?

49 of 181

50 of 181

51 of 181

TSAN

52 of 181

53 of 181

54 of 181

TSAN happy

==

text rendering was thread safe

in a regression-safe way

55 of 181

56 of 181

57 of 181

Better tools enables us to do things we weren’t able to do before

58 of 181

59 of 181

Perf Testing with Puppeteer, Chrome Tracing and PMUs

Benoit Girard

Software Engineer

Facebook

60 of 181

How we do perf testing in the industry:

  • Hardware is different
  • Noise due to background execution

Developer

Perf Server

  • Slow to get results
  • Results are noisy
  • Results are hard to debug!

Send your checkout

61 of 181

How we do perf testing in the industry:

Continuous quantities:

  • Wall Time
  • CPU Time

^^ Source of noise

Discrete quantities:

  • JavaScript Code Size
  • IO Operations
  • # of network fetches

^^ Reproducible, countable, debuggable!

62 of 181

Can we do better!?

63 of 181

Can we do better!? Yes!

Developer

Retired Instruction Counter

Replace Wall/CPU Time with Instruction Counts

Pros:

  • Accurate with 100s of threads spamming CPU & IO operations.
  • More sensitive than Wall or CPU time.
  • Run locally, results in seconds.

Cons:

  • Won’t catch everything like a sleep() call.
  • Requires math!

64 of 181

Instruction Counter Math

Run JavaScript

1 second

Execute JavaScript

Download JavaScript

1 second

Download 1 MB of JavaScript

How many instructions can we execute?

Instructions = Time Budget * Frequency * Instructions per cycles * thread parallelism

Modern Desktop CPU ~=

Instructions ~= 1s * 2 Ghz * 1 Instruction / Cycle * 1 thread (web)

Instructions ~= 2,000,000,000 instructions

Each processor will have its own Frequency and Instruction / Cycle.

65 of 181

Collect using Puppeteer + Tracing

CL 1436079: Extend Chrome Tracing to collect instruction count for each block.

No changes to puppeteer.

Collect instruction counts for exactly the execution you want.

Easy to remove sources of noise like GC

66 of 181

Noise

1ms -> 100 μs

67 of 181

Where’s the noise coming from?

  • Code warm-up / Code Sharing
  • Lazy parsing?
  • Background Parsing Thread?
  • Branching on timers (setTimeout, VSync, etc…)?
  • Syscall output?

Making branching deterministics can drive down noise further!

Record-replay debuggers can find noise sources.

68 of 181

What’s next?

Integrating it in the workflow of web engineers at Facebook

Exploring integration with the React Profiler.

69 of 181

Call to action

More projects using this!

70 of 181

Time

71 of 181

Blinkin’ Views

sadrul@chromium.org

72 of 181

Views: Native toolkit for the UI

73 of 181

Views: Native toolkit for the UI

74 of 181

75 of 181

aura::Window

76 of 181

views::View

views::Widget

77 of 181

Views: Devtools support!

--enable-ui-devtools

chrome://inspect#other

78 of 181

Views

  • A views::Widget is the top-level container.
    • The Widget manages*** the compositor (cc::LayerTreeHost).
    • In aura platforms (Windows, Linux, ChromeOS), Widget does it through aura.
  • A tree of views::View elements inside the Widget.
  • Some of the View elements can have their own cc::Layer instances.

*** Things are somewhat different on ChromeOS. But the margin for this lightning talk is too narrow to explain.

Layer Tree

View Tree

View

View

Layer

Layer

79 of 181

Blink

80 of 181

Interaction with Compositor (cc)

Views

Compositor (cc)

Browser

  • Views holds cc wrong … sometimes.
    • views came first.
  • No dedicated views team until recently.
  • Many performance issues with views.
    • MacViews, ChromeOS.

Blink

Compositor (cc)

Renderer

  • Focus of cc since its inception.
    • cc used to live inside WebKit!
  • Lots of optimization for each step over the years.
  • A large team working on it.
    • As long as web exists, this will be true.
  • More to come!
    • Worklets etc.

81 of 181

Thought experiment: What if ...

Views

Compositor (cc)

Views

[Parts of] Blink

Compositor (cc)

Browser

Browser

Many Unknowns!!

  • Oilpan in browser
  • Event handlers
  • Sync IPC to browser

82 of 181

Lightning talk

  • Short
  • Scary

  • Mission accomplished

83 of 181

HTML5 apps on AGL

BlinkOn 10 / April 9th, 2019

(Toronto, Canada)

Julie Jeongeun Kim

jkim@igalia.com

84 of 181

Automotive Grade Linux (AGL)

  • A collaborative open source project that is bringing together automakers, suppliers and technology companies
  • A Linux-based, open software platform
  • Hosted at Linux Foundation
  • Focused on rapid innovation of vehicle software
  • https://www.automotivelinux.org/

Executives from Honda, Mazda, Subaru, Suzuki and Toyota on stage together at Automotive Linux Summit 2018.

85 of 181

AGL members

86 of 181

Chromium and WebRuntime in AGL

  • Igalia collaborated with LGE.
  • WebRuntime
    • LGE open-sourced WebOS WebRuntime solution, Web Application Manager(WAM).
    • Igalia migrated it to AGL platform.
  • Chromium with Wayland
    • Chromium/Wayland’s worked with Ozone since last year.
    • LGE supported the interface layer for WAM to Chromium.
    • Igalia added ivi protocol to Chromium in AGL.

AGL

Chromium

Web Application

Manager

(Web Runtime)

AGL event handling

Communicating with Wayland

87 of 181

[memory-match]

[youtube]

[web browser]

88 of 181

Current status

  • Web Application Manager works with Chromium68.
  • Chromium68 works with upstream wayland port.
  • Works on Renesas m3 board, Minnowboard, and RPi 3 which are reference target boards.
  • Presented WAM Demo at CES 2019.
  • AGL has Web Application Manager and Chromium at meta-html5-framework.

89 of 181

90 of 181

Plans

  • Adapt WAM to new HMI architecture
  • Improve the design for handling security
  • Upgrade to more morden Chromium version.
  • Stabilize and enhance performance.
  • Make better communication in WAM, between launcher and browser.

91 of 181

See Jose Dapena Paz’s talk for more details!

April 10 Day 2, 13:50~14:20 Room #315

Web Technologies in Robotics and Automotive

92 of 181

Q&A

Lorenzo Tilve (ltilve@)

Jacobo Aragunde (jaragunde@)

Antia Puentes (apuentes@)

Julie Kim (jkim@)

93 of 181

References

94 of 181

Chrome's Android APK Size

BlinkOn 2019 Lightning Talk

agrieve@chromium.org

95 of 181

APK Breakdown

96 of 181

97 of 181

android-binary-size Trybot

98 of 181

android-binary-size Trybot

99 of 181

Per-milestone size viewer

100 of 181

Command-line Tool for Symbol Size Database

>>> Print(canned_queries.CategorizeGenerated())

Showing 27 symbols (27 unique) with total pss: 8152217 bytes

Sizes: .text=5.89mb .rodata=570kb .data.rel.ro=387kb Index | Running Total | Section@Address | PSS | Path

------------------------------------------------------------

0) 1868914 (22.9%) *@Group 1868914 Blink (bindings)

1) 3718254 (45.6%) *@Group 1849340 Mojo

2) 5008602 (61.4%) *@Group 1290348 V8 Builtins

3) 6118639 (75.1%) *@Group 1110036 C++ Protocol Buffers

4) 6592262 (80.9%) *@Group 473623 DevTools

5) 6914864 (84.8%) *@Group 322601 Blink (Other)

6) 7188328 (88.2%) *@Group 273464 Java Protocol Buffers

7) 7284567 (89.4%) *@Group 96239 gl_bindings_autogen

8) 7374507 (90.5%) *@Group 89940 Metrics-related code

...

101 of 181

Command-line Tool for Symbol Size Database

>>> Print(canned_queries.CategorizeGenerated())

Showing 27 symbols (27 unique) with total pss: 8152217 bytes

Sizes: .text=5.89mb .rodata=570kb .data.rel.ro=387kb Index | Running Total | Section@Address | PSS | Path

------------------------------------------------------------

0) 1868914 (22.9%) *@Group 1868914 Blink (bindings)

1) 3718254 (45.6%) *@Group 1849340 Mojo

2) 5008602 (61.4%) *@Group 1290348 V8 Builtins

3) 6118639 (75.1%) *@Group 1110036 C++ Protocol Buffers

4) 6592262 (80.9%) *@Group 473623 DevTools

5) 6914864 (84.8%) *@Group 322601 Blink (Other)

6) 7188328 (88.2%) *@Group 273464 Java Protocol Buffers

7) 7284567 (89.4%) *@Group 96239 gl_bindings_autogen

8) 7374507 (90.5%) *@Group 89940 Metrics-related code

...

102 of 181

103 of 181

Max Size for Low End (64.6MiB)

104 of 181

Max Size for Low End (64.6MiB)

600KiB of growth each milestone

105 of 181

Max Size for Low End (64.6MiB)

600KiB of growth each milestone

106 of 181

Useful Size Links

107 of 181

Goma is not silver bullet

What made build slow?

Takuto Ikuta (tikuta@chromium.org)

108 of 181

Several 10k lines of .cc files (2019 Q1)

Decoupling some very large src files in v8 utilizes goma's parallelism

  • builtins-array-from-dsl-gen.cc: 50k LOC -> less than 23k LOC files
  • objects.cc: 19k LOC -> less than 8.6k LOC files

made build time of d8 (v8's shell) 1.4 times faster with goma (103s -> 71s)

109 of 181

Unnecessary build dependency (2018 Q2)

v8's code-stub-assembler.o

build trace of chrome, many tasks unnecessarily wait finish of v8's snapshot generation

110 of 181

Slow linker (2018 Q2)

daily compile step time of win7_chromium_rel_ng (aka win7-rel)

link.exe

⬇️

LLD

111 of 181

Slow process creation in ninja (2017 Q3)

From ninja v1.8.0, per process creation overhead was improved by using vfork.

Per build task�process creation overhead

Total overhead for chrome�(36k build tasks)

Ninja < v1.8.0

3.7ms

133s

Ninja >= v1.8.0

1ms

36s

112 of 181

Summary

Followings made/make build slow

  • Large source files
  • Unnecessary build dependency
  • Slow linker
  • Ninja's overhead

We keep our effort to optimize build performance!

113 of 181

Remove Web Components v0 updates

BlinkOn 10 April 8, 2019

Yoichi Osato(yoichio@chromium.org)

114 of 181

What is Web Components v0?

They’re Chrome only APIs, no other browsers implement, to be ✞removed✞.

  • Shadow DOM v0
  • Custom Elements v0
  • HTML Imports

115 of 181

Project history

  • 2018Q2
    • Sent “Intent to Deprecate and Remove”.
      • Started deprecation messages.
  • 2019Q1
    • Removed!

116 of 181

☠ was broken entirely. ☠

and the patch was reverted in a day. [1]

117 of 181

Still many usage in wild (comparing 2018 Q2)

Deprecation message has not inclined web authors even they’re google.

    • We need some more effort.

118 of 181

Plans

  • Migration effort.
    • DevRel work.
    • Reverse origin trials.
    • PR Polymer.

  • Postpone the removal until less usage.
    • Define what is ‘less’ actually.
      • Polymer/origin trials
    • Partial removing?

119 of 181

So many contributors! Thanks!!

chasej@, chrishtr@, dfreedm@, dpapad@, ebidel@, einbinder@, fukino@, groby@, hayato@, iclelland@, jochen@, kenjibaheux@, kochi@, koji@, kschaaf@, lucmult@, lunalu@, mmoss@, msychev@, mwp@, pfeldman@, rbyers@, rbpotter@, tkent@, yoshin@ and more!

120 of 181

We are burying them!

  • Shadow DOM v0
  • Custom Elements v0
  • HTML Imports
  • Shadow DOM v0
  • Custom Elements v0
  • HTML Imports

121 of 181

Language Server Protocol for mojom

BlinkOn 10

bashi@chromium.org

122 of 181

No editor support for mojom files...

123 of 181

Write clients for each editor?

Mojom plugin

mojom-mode.el

Mojom extension

124 of 181

Language Server Protocol

The idea behind the Language Server Protocol is to generalize how editor/backend communicate, so a single server can be re-used in multiple editors

125 of 181

Language Server Protocol to share logic as much as possible

LSP Server

LSP Client

LSP Client

LSP Client

126 of 181

Mojom LSP

  • Syntax check (no semantic check yet)
  • Goto definition

127 of 181

Emacs Demo

128 of 181

VSCode Demo

129 of 181

Chrome Status Summaries for Web Developers

Announcing: Blink Intent Process Crash Course

Yoav Weiss

Joe Medley

Proprietary + Confidential

Proprietary + Confidential

Proprietary + Confidential

130 of 181

Fonts Highlights

BlinkOn 10, Toronto

Lightning Talks Day 1

Dominik Röttsches�drott@google.com

131 of 181

Native support for AAT Fonts

Font Matching Improvements

132 of 181

AAT - State Machine

133 of 181

OpenType - GSUB Lookup Tables

134 of 181

135 of 181

136 of 181

html5-full-render on Mac

137 of 181

HarfBuzz AAT Speed-Up (over CoreText backend)

138 of 181

Thanks, @behdad, @ebraminio!

139 of 181

Font Matching Improvements

140 of 181

Family Matching

141 of 181

“Local Matching”

Resolving src: local(<name>)

142 of 181

Google Fonts on Android

  • Google Fonts uses src: local() sources as speed-up when local version is available
  • Without correct src: local() matching �Google Fonts speedup ineffective

143 of 181

Before

After

Only Roboto Regular selectable for local-speedup

~12 Fonts

All pre-installed fonts precisely selectable

~240 Fonts

144 of 181

145 of 181

Summary

  • Native AAT support in HarfBuzz brings 3-12x improvements in AAT shaping performance
  • Src: local() fix allows better selection of pre-installed fonts on Android and other OSes

146 of 181

RTCQuicTransport Web API

Seth Hampson

shampson@chromium.org

147 of 181

Motivation

  • Low level & high performance data transport in the web
  • Modern API
    • Incorporates send-side backpressure
  • “Next Version” WebRTC effort
    • Lower level components
    • No SDP!

148 of 181

Overview

  • Exposes QUIC connection & QUIC streams
  • Peer to peer
    • Uses the ICE protocol for P2P connection
  • Standalone (no RTCPeerConnection stack)
  • Built in encryption and congestion control

149 of 181

File Transfer Demo :)

150 of 181

151 of 181

So, what’s next???

152 of 181

Future

  • Origin Trial in Chrome 73 - 75
    • Looking for developer feedback
  • WHATWG streams
  • Datagrams
  • Discussion
    • Client/Server API without ICE
    • Generic data transport API
    • Moving to WICG
  • Come talk if you want to get involved!
  • See blog post

153 of 181

Thanks!

154 of 181

What LUCI gives us?

155 of 181

What is LUCI?

156 of 181

Layered

Universal

Continuous

Integration

157 of 181

Lucy

158 of 181

Swarming

159 of 181

Buildbot is gone!

160 of 181

What is LUCI?

161 of 181

Micro services

before it was cool

162 of 181

Serverless

before it was cool

163 of 181

TL;DR: Scale, lots of it

164 of 181

Blink is a lot of tests

165 of 181

Chromium is a lotter of tests

166 of 181

14 years, per day

On 14 000 workers

167 of 181

Size of tests

binaries last year?

(compressed)

168 of 181

10TiB?

169 of 181

100TiB?

170 of 181

9.3PiB!

171 of 181

300 TiB of I/O per day

Compressed.

172 of 181

Secret sauce?

173 of 181

Reproducible environment

174 of 181

Key points

  • VMs recreated daily
  • Content addressed inputs and outputs!
  • Reproducibility
  • Horizontal scaling
  • Strong security and audit

175 of 181

Users

  • Chrome, ChromeOS and satellite projects
  • Fuchsia
  • Google Home
  • Nest
  • Stadia

… and others

176 of 181

Thanks!

177 of 181

Chromium Slack

  • Available at https://chromium.slack.com/
  • Open forum for discussions around Chromium development
  • Replacement for #chromium / #blink channels on IRC
  • If you don’t have a @chromium.org account, send an email to chromium-slack-invites@chromium.org

178 of 181

Why?

179 of 181

Feedback?

If you don’t currently use Slack, but you would if:

  • it didn’t require a separate account
  • it didn’t require 2FA
  • it didn’t require being a Chromium developer
  • <insert reason here>

Please talk to dcheng@chromium.org!

180 of 181

(๑>ᴗ<๑)

181 of 181

See you tomorrow!

(๑>ᴗ<๑)

*

*

*

*