blob: 9094bf656f147b7889d2fbda65385bd73903e9ca [file] [log] [blame] [edit]
# Copyright 2023 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Crosetto boottrace"
author "ctshao@google.com"
start on started traced_probes
stop on stopping traced_probes
oom score -100
# To enable Crosetto boottracing, add "cros_boottrace" to kernel commandline.
# Additionally, the ftrace tracing before start of Crosetto can be enabled by
# adding "trace_buf_size=8M trace_event=[ftrace events list in
# boottrace.pbtxt]" to kernel commandline.
pre-start script
if ! grep -qs 'cros_boottrace' /proc/cmdline; then
stop
fi
end script
exec /usr/bin/perfetto \
-c /usr/local/share/boottrace/boottrace.pbtxt --txt \
-o /run/perfetto/boottrace.perfetto-trace