This leads to more general questions regarding the dev workflow:
Which file is the entry point to the main process?
If not, how can I set --log-timer-events for the main process?
Note: Everything in the src/browser directory is executed in the main process. Stuff in just the src directory is for the renderer process.
You could probably cobble something like this together, but then you’re not profiling Atom’s actual startup performance.
How can I set --log-timer-events for the main process?
Have you noticed the --profile-startup flag in the Atom command-line help?
$ atom --help
Atom Editor v1.7.0-dev-627adc6
Usage: atom [options] [path ...]
One or more paths to files or folders may be specified. If there is an
existing Atom window that contains all of the given folders, the paths
will be opened in that window. Otherwise, they will be opened in a new
ATOM_DEV_RESOURCE_PATH The path from which Atom loads source code in dev mode.
Defaults to `~/github/atom`.
ATOM_HOME The root path for all configuration files and folders.
Defaults to `~/.atom`.
-1, --one This option is no longer supported. [boolean]
--include-deprecated-apis This option is not currently supported. [boolean]
-d, --dev Run in development mode. [boolean]
-f, --foreground Keep the browser process in the foreground. [boolean]
-h, --help Print this usage message. [boolean]
-l, --log-file Log all output to file. [string]
-n, --new-window Open a new window. [boolean]
--profile-startup Create a profile of the startup execution time. [boolean]
-r, --resource-path Set the path to the Atom source directory and enable dev-mode. [string]
--safe Do not load packages from ~/.atom/packages or ~/.atom/dev/packages.
--portable Set portable mode. Copies the ~/.atom folder to be a sibling of the
installed Atom location if a .atom folder is not already there.
-t, --test Run the specified specs and exit with error code on failures. [boolean]
--timeout When in test mode, waits until the specified time (in minutes) and
kills the process (exit code: 130). [string]
-v, --version Print the version information. [boolean]
-w, --wait Wait for window to be closed before returning. [boolean]
--clear-window-state Delete all Atom environment state. [boolean]
-a, --add Open path as a new project in last used window. [boolean]
Thanks a lot. I tried --profile-startup, but I believe its result is based on the sampling profiler with --prof flag. I am more curious about seeing the breakdown showing time spent on parsing, compilation, inline cache misses, etc., which can be obtained by --log-timer-events flag. How do I start atom with Chromium or V8 flags set from the beginning?