This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PATCH] Report LTO phase in lto1 process name v2


On 10-10-06 11:49 AM, Andi Kleen wrote:
From: Andi Kleen<ak@linux.intel.com>

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.

Passes bootstrap and testsuite on x86_64-linux. Ok to commit?

  AC_SUBST(CHECK)
  AC_SUBST(target_header_dir)

+# check for prctl PR_SET_NAME
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include<sys/prctl.h>
+int main()
+{
+  return (prctl(PR_SET_NAME, "foo") == 0) ? 0 : 1;
+}
+]])], AC_DEFINE(HAVE_PRCTL_SET_NAME, 1,
+	[Define if you have prctl PR_SET_NAME]))
+

I can no longer cross compile libiberty after this patch:


configure: error: in `/home/ryan/gnu/gcc/trunk/arm-eabi/arm-unknown-linux-gnueabi/libiberty':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.
make[1]: *** [configure-target-libiberty] Error 1
make[1]: Leaving directory `/home/ryan/gnu/gcc/trunk/arm-eabi'
make: *** [all] Error 2


libiberty/configure now has:

# check for prctl PR_SET_NAME
if test "$cross_compiling" = yes; then :
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run test program while cross compiling
See \`config.log' for more details." "$LINENO" 5; }
else

Regards,

Ryan Mansfield


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]