diff options
author | Andi Kleen <ak@linux.intel.com> | 2010-10-06 22:02:58 +0000 |
---|---|---|
committer | Andi Kleen <ak@gcc.gnu.org> | 2010-10-06 22:02:58 +0000 |
commit | 6e9bd0f8983779325b34a9645c2634dafd14d3c9 (patch) | |
tree | 4b6b55c80051aa7deeeb8de1d0979f488e306b4c /include | |
parent | 826d817faeaa2549589553b276e4c71f83ce6dd7 (diff) | |
download | gcc-6e9bd0f8983779325b34a9645c2634dafd14d3c9.zip gcc-6e9bd0f8983779325b34a9645c2634dafd14d3c9.tar.gz gcc-6e9bd0f8983779325b34a9645c2634dafd14d3c9.tar.bz2 |
[PATCH] Report LTO phase in lto1 process name v2
On larger parallel WHOPR builds I find it useful to see in top which
phase a given lto1 is in.
Set the process name to lto1-wpa, lto1-ltrans, lto1-lto depending
on the current mode.
This is currently only implemented for Linux and only
using the "comm" process name, which is reported in top.
v2: Moved function to libiberty, renamed setproctitle to match
BSD. In theory it should pick up BSD's libc function for this
on a BSD system, but I haven't tested this.
gcc/lto/
2010-10-06 Andi Kleen <ak@linux.intel.com>
* lto.c (lto_process_name): Add.
(lto_main): Call lto_process_name.
include/
2010-10-06 Andi Kleen <ak@linux.intel.com>
* libiberty.h (setproctitle): Add prototype.
libiberty/
2010-10-06 Andi Kleen <ak@linux.intel.com>
* Makefile.in (CFILES): Add setproctitle.
(CONFIGURED_OFILES): Add setproctitle.
(setproctitle): Add rule.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add checks for prctl PR_SET_NAME and setproctitle.
* setproctitle.c: Add file.
* functions.texi: Regenerate.
From-SVN: r165066
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/libiberty.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index ec24917..3f4daa6 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2010-10-06 Andi Kleen <ak@linux.intel.com> + + * libiberty.h (setproctitle): Add prototype. + 2010-09-09 Jakub Jelinek <jakub@redhat.com> * dwarf2.h (DW_OP_GNU_implicit_pointer): New. diff --git a/include/libiberty.h b/include/libiberty.h index b320b18..f54ca18 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -634,6 +634,9 @@ extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3, extern int strverscmp (const char *, const char *); #endif +/* Set the title of a process */ +extern void setproctitle (const char *name, ...); + #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) /* Drastically simplified alloca configurator. If we're using GCC, |