diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-25 05:47:08 +0000 |
---|---|---|
committer | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-30 14:31:33 +0200 |
commit | f708dd1262df8033d4709dbba1da026e8b92f669 (patch) | |
tree | c8b44c3930fb7ba5da81605ea1c2c120d20c1506 | |
parent | 2ceddf5449bb99683e096b39120a602a5de6a6ec (diff) |
Add a PROFILE mode
* Makefile: Change FOOFLAGS defaults to appropriate values when
$(PROFILE) is defined.
* rootdir.c: Add an "exit" file, which causes exit to be called
when looked up, so that profiling data can be written to disk.
-rw-r--r-- | rootdir.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -422,6 +422,15 @@ static const struct procfs_dir_entry rootdir_entries[] = { .cleanup_contents = procfs_cleanup_contents_with_free, }, }, +#ifdef PROFILE + /* In order to get a usable gmon.out file, we must apparently use exit(). */ + { + .name = "exit", + .ops = { + .make_node = exit, + }, + }, +#endif {} }; |