Set up the profiler in CLI mode.

Change-Id: I7f36786573870b66b4f1e93c2fc2e444f1ae1252
Merge "Set up the profiler in CLI mode."