-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a standalone version of systemd-bootchart, extracted from the systemd repository as of commit ID 2c45295e4764. The idea is to give this tool a new home, because it is not actually related to systemd in any way, can well live outside of the repository, and is actually useful beyond the scope of systemd itself.
- Loading branch information
0 parents
commit e6c5e46
Showing
114 changed files
with
19,176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
*.a | ||
*.cache | ||
*.html | ||
*.la | ||
*.lo | ||
*.log | ||
*.o | ||
*.plist | ||
*.pyc | ||
*.stamp | ||
*.swp | ||
*.trs | ||
*~ | ||
.config.args | ||
.deps/ | ||
.dirstamp | ||
.libs/ | ||
/*.gcda | ||
/*.gcno | ||
/*.tar.bz2 | ||
/*.tar.gz | ||
/*.tar.xz | ||
/build-aux | ||
/libtool | ||
/Makefile | ||
/TAGS | ||
/GPATH | ||
/GRTAGS | ||
/GSYMS | ||
/GTAGS | ||
/systemd-bootchart | ||
Makefile.in | ||
aclocal.m4 | ||
config.h | ||
config.h.in | ||
config.log | ||
config.status | ||
configure | ||
stamp-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
# -*- Mode: makefile; indent-tabs-mode: t -*- | ||
# | ||
# This file is part of systemd-bootchart | ||
# | ||
# systemd is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation; either version 2.1 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# systemd is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with systemd; If not, see <http://www.gnu.org/licenses/>. | ||
|
||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} | ||
AM_MAKEFLAGS = --no-print-directory | ||
AUTOMAKE_OPTIONS = color-tests parallel-tests | ||
|
||
GCC_COLORS ?= 'ooh, shiny!' | ||
export GCC_COLORS | ||
|
||
SUBDIRS = . | ||
|
||
# remove targets if the command fails | ||
.DELETE_ON_ERROR: | ||
|
||
# keep intermediate files | ||
.SECONDARY: | ||
|
||
# Keep the test-suite.log | ||
.PRECIOUS: $(TEST_SUITE_LOG) Makefile | ||
|
||
# Dirs of external packages | ||
systemdir=@systemdir@ | ||
|
||
# And these are the special ones for / | ||
rootprefix=@rootprefix@ | ||
rootbindir=$(rootprefix)/bin | ||
rootlibexecdir=$(rootprefix)/lib/systemd | ||
pkgsysconfdir=$(sysconfdir)/systemd | ||
systemunitdir=$(rootprefix)/lib/systemd/system | ||
|
||
AM_CFLAGS = $(OUR_CFLAGS) | ||
AM_LDFLAGS = $(OUR_LDFLAGS) | ||
AM_CPPFLAGS = \ | ||
-include $(top_builddir)/config.h \ | ||
-DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" \ | ||
-DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \ | ||
-DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \ | ||
-DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" \ | ||
-DROOTPREFIX=\"$(rootprefix)\" \ | ||
-DLIBDIR=\"$(libdir)\" \ | ||
-DROOTLIBDIR=\"$(rootlibdir)\" \ | ||
-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ | ||
-I $(top_srcdir)/src | ||
|
||
##################################################### | ||
|
||
EXTRA_DIST = man/bootchart.conf.xml man/systemd-bootchart.xml units/systemd-bootchart.service.in | ||
MANPAGES = man/bootchart.conf.5 man/systemd-bootchart.1 | ||
MANPAGES_ALIAS = man/bootchart.conf.d.5 | ||
|
||
man_MANS = $(MANPAGES) $(MANPAGES_ALIAS) | ||
|
||
man/bootchart.conf.d.5: man/bootchart.conf.5 | ||
|
||
XSLTPROC_FLAGS = \ | ||
--nonet \ | ||
--xinclude \ | ||
--stringparam man.output.quietly 1 \ | ||
--stringparam funcsynopsis.style ansi \ | ||
--stringparam man.authors.section.enabled 0 \ | ||
--stringparam man.copyright.section.enabled 0 \ | ||
--stringparam systemd.version $(VERSION) \ | ||
--path '$(builddir)/man:$(srcdir)/man' | ||
|
||
XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc) | ||
XSLTPROC_PROCESS_MAN = \ | ||
$(AM_V_XSLT)$(XSLT) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-man.xsl $< | ||
|
||
man/%.1: man/%.xml man/custom-man.xsl | ||
$(XSLTPROC_PROCESS_MAN) | ||
|
||
man/%.5: man/%.xml man/custom-man.xsl | ||
$(XSLTPROC_PROCESS_MAN) | ||
|
||
##################################################### | ||
|
||
libutils_la_SOURCES = \ | ||
src/alloc-util.c \ | ||
src/alloc-util.h \ | ||
src/architecture.h \ | ||
src/build.h \ | ||
src/cgroup-util.c \ | ||
src/cgroup-util.h \ | ||
src/conf-files.c \ | ||
src/conf-files.h \ | ||
src/conf-parser.c \ | ||
src/conf-parser.h \ | ||
src/def.h \ | ||
src/dirent-util.c \ | ||
src/dirent-util.h \ | ||
src/escape.c \ | ||
src/escape.h \ | ||
src/fd-util.c \ | ||
src/fd-util.h \ | ||
src/fileio.c \ | ||
src/fileio.h \ | ||
src/formats-util.h \ | ||
src/fs-util.c \ | ||
src/fs-util.h \ | ||
src/gunicode.c \ | ||
src/gunicode.h \ | ||
src/hash-funcs.c \ | ||
src/hash-funcs.h \ | ||
src/hashmap.c \ | ||
src/hashmap.h \ | ||
src/hexdecoct.c \ | ||
src/hexdecoct.h \ | ||
src/hostname-util.c \ | ||
src/hostname-util.h \ | ||
src/io-util.c \ | ||
src/io-util.h \ | ||
src/list.h \ | ||
src/log.c \ | ||
src/log.h \ | ||
src/login-util.c \ | ||
src/login-util.h \ | ||
src/macro.h \ | ||
src/mempool.c \ | ||
src/mempool.h \ | ||
src/missing.h \ | ||
src/parse-util.c \ | ||
src/parse-util.h \ | ||
src/path-util.c \ | ||
src/path-util.h \ | ||
src/process-util.c \ | ||
src/process-util.h \ | ||
src/random-util.c \ | ||
src/random-util.h \ | ||
src/_sd-common.h \ | ||
src/sd-messages.h \ | ||
src/set.h \ | ||
src/siphash24.c \ | ||
src/siphash24.h \ | ||
src/socket-util.c \ | ||
src/socket-util.h \ | ||
src/special.h \ | ||
src/stdio-util.h \ | ||
src/string-table.c \ | ||
src/string-table.h \ | ||
src/string-util.c \ | ||
src/string-util.h \ | ||
src/strv.c \ | ||
src/strv.h \ | ||
src/strxcpyx.c \ | ||
src/strxcpyx.h \ | ||
src/terminal-util.c \ | ||
src/terminal-util.h \ | ||
src/time-util.c \ | ||
src/time-util.h \ | ||
src/umask-util.h \ | ||
src/unaligned.h \ | ||
src/unit.h \ | ||
src/unit-name.c \ | ||
src/unit-name.h \ | ||
src/user-util.c \ | ||
src/user-util.h \ | ||
src/utf8.c \ | ||
src/utf8.h \ | ||
src/util.c \ | ||
src/util.h \ | ||
src/virt.c \ | ||
src/virt.h | ||
|
||
libutils_la_CFLAGS = \ | ||
$(AM_CFLAGS) \ | ||
$(LIBSYSTEMD_JOURNAL_CFLAGS) | ||
|
||
libutils_la_LIBADD = \ | ||
$(LIBSYSTEMD_JOURNAL_LIBS) | ||
|
||
noinst_LTLIBRARIES = libutils.la | ||
|
||
##################################################### | ||
|
||
systemd_bootchart_SOURCES = \ | ||
src/bootchart.c \ | ||
src/bootchart.h \ | ||
src/store.c \ | ||
src/store.h \ | ||
src/svg.c \ | ||
src/svg.h | ||
|
||
systemd_bootchart_LDADD = \ | ||
libutils.la | ||
|
||
##################################################### | ||
|
||
substitutions = \ | ||
'|rootlibexecdir=$(rootlibexecdir)|' | ||
|
||
SED_PROCESS = \ | ||
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | ||
$(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | ||
< $< > $@ | ||
|
||
units/%: units/%.in | ||
$(SED_PROCESS) | ||
|
||
man/%: man/%.in | ||
$(SED_PROCESS) | ||
|
||
rootlibexec_PROGRAMS = systemd-bootchart | ||
dist_pkgsysconf_DATA = src/bootchart.conf | ||
nodist_systemunit_DATA = units/systemd-bootchart.service | ||
|
||
in_files = $(filter %.in,$(EXTRA_DIST)) | ||
|
||
CLEANFILES = \ | ||
$(MANPAGES) $(MANPAGES_ALIAS) \ | ||
$(pkgconfigdata_DATA) \ | ||
$(pkgconfiglib_DATA) \ | ||
$(in_files:.in=) | ||
|
||
install-exec-hook: $(INSTALL_EXEC_HOOKS) | ||
|
||
uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS) | ||
|
||
install-data-hook: $(INSTALL_DATA_HOOKS) | ||
|
||
.PHONY: git-tag | ||
git-tag: | ||
git tag -s "v$(VERSION)" -m "systemd $(VERSION)" | ||
|
||
.PHONY: git-tar | ||
git-tar: | ||
git archive --format=tar --prefix=systemd-$(VERSION)/ HEAD | xz > systemd-$(VERSION).tar.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
For systemd-bootchart, several proc debug interfaces are required in the kernel config: | ||
CONFIG_SCHEDSTATS | ||
CONFIG_SCHED_DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- plot per-process IO utilization | ||
- group processes based on service association (cgroups) | ||
- document initcall_debug | ||
- kernel cmdline "bootchart" option for simplicity? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/sh | ||
|
||
# This file is part of systemd-journal-remote. | ||
# | ||
# systemd is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation; either version 2.1 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# systemd is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with systemd; If not, see <http://www.gnu.org/licenses/>. | ||
|
||
set -e | ||
|
||
oldpwd=$(pwd) | ||
topdir=$(dirname $0) | ||
cd $topdir | ||
|
||
if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then | ||
# This part is allowed to fail | ||
cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ | ||
chmod +x .git/hooks/pre-commit && \ | ||
echo "Activated pre-commit hook." || : | ||
fi | ||
|
||
intltoolize --force --automake | ||
autoreconf --force --install --symlink | ||
|
||
libdir() { | ||
echo $(cd "$1/$(gcc -print-multi-os-directory)"; pwd) | ||
} | ||
|
||
args="\ | ||
--sysconfdir=/etc \ | ||
--localstatedir=/var \ | ||
--libdir=$(libdir /usr/lib) \ | ||
" | ||
|
||
if [ -f "$topdir/.config.args" ]; then | ||
args="$args $(cat $topdir/.config.args)" | ||
fi | ||
|
||
if [ ! -L /bin ]; then | ||
args="$args \ | ||
--with-rootprefix=/ \ | ||
--with-rootlibdir=$(libdir /lib) \ | ||
" | ||
fi | ||
|
||
cd $oldpwd | ||
|
||
if [ "x$1" = "xc" ]; then | ||
$topdir/configure CFLAGS='-g -O0 -ftrapv' $args | ||
make clean | ||
else | ||
echo | ||
echo "----------------------------------------------------------------" | ||
echo "Initialized build system. For a common configuration please run:" | ||
echo "----------------------------------------------------------------" | ||
echo | ||
echo "$topdir/configure CFLAGS='-g -O0 -ftrapv' $args" | ||
echo | ||
fi |
Oops, something went wrong.