Add CPU usage perf tests for legacy IPC and Mojo.

These tests do async/sync ping-pongs between two processes for legacy IPC/Mojo.
They do it in a somewhat fixed-rate manner: split one second into a fixed
amount of "frames", and do a fixed amount of ping-pongs for each frame.

Current numbers:
Linux; release component build; Z620
Test name description:
 * Async / Sync: Whether ping-pong is done using async messages or sync messages.
 * MsgSize: Size of each message, in bytes.
 * FrmPerSec: Frames per second.
 * MsgPerFrm: How many messages sent and received (i.e., round trips) per frame.

Test result: The percentage of a CPU core used during the test, on average.
(It could be the sum of cost on multiple cores.)

[ RUN      ] ChannelSteadyPingPongTest.AsyncPingPong
IPC_CPU_Async_MsgSize_144_FrmPerSec_20_MsgPerFrm_10	5.68031	%
IPC_CPU_Async_MsgSize_144_FrmPerSec_60_MsgPerFrm_10	15.7017	%

[ RUN      ] ChannelSteadyPingPongTest.SyncPingPong
IPC_CPU_Sync_MsgSize_144_FrmPerSec_20_MsgPerFrm_10	5.68387	%
IPC_CPU_Sync_MsgSize_144_FrmPerSec_60_MsgPerFrm_10	15.4848	%

[ RUN      ] MojoSteadyPingPongTest.AsyncPingPong
Mojo_CPU_Async_MsgSize_144_FrmPerSec_20_MsgPerFrm_10	3.68818	%
Mojo_CPU_Async_MsgSize_144_FrmPerSec_60_MsgPerFrm_10	10.2393	%

[ RUN      ] MojoSteadyPingPongTest.SyncPingPong
Mojo_CPU_Sync_MsgSize_144_FrmPerSec_20_MsgPerFrm_10	3.69054	%
Mojo_CPU_Sync_MsgSize_144_FrmPerSec_60_MsgPerFrm_10	10.7317	%


Bug: 759845
Change-Id: Idc8139a90c3175193aab68a8fc91d1aeac1aa340
Reviewed-on: https://chromium-review.googlesource.com/639340
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Commit-Queue: Yuzhu Shen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#500074}
diff --git a/ipc/BUILD.gn b/ipc/BUILD.gn
index 42621399..5753bd5 100644
--- a/ipc/BUILD.gn
+++ b/ipc/BUILD.gn
@@ -250,7 +250,12 @@
 
   test("ipc_perftests") {
     sources = [
+      "ipc_cpu_perftest.cc",
       "ipc_mojo_perftest.cc",
+      "ipc_perftest_messages.cc",
+      "ipc_perftest_messages.h",
+      "ipc_perftest_util.cc",
+      "ipc_perftest_util.h",
       "run_all_perftests.cc",
     ]