diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-11-21 02:52:41 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-11-21 02:52:41 +0000 |
commit | bc87a8ff8c5b6374a00a950cd15e1b290d6c5e06 (patch) | |
tree | 616bbb782feaabc04d48c963ff1b4b1cfec5b267 | |
parent | 7ca10817122d3b7b30fabb1cadb75e5ee14b364e (diff) |
Remove bundled hwloc-1.2.1. Use either native Linux affinity support or an external libhwloc.
(for details see https://sourceforge.net/mailarchive/forum.php?thread_name=CAJpkDYeZpwqcWxZ77wq6bMrnhn-KzkU1xAqb3cU0drfnA3n9FQ%40mail.gmail.com&forum_name=htop-general )
83 files changed, 14 insertions, 72615 deletions
diff --git a/Makefile.am b/Makefile.am index 419054e5..b648969b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,5 @@ -if HAVE_BUNDLED_HWLOC -SUBDIRS = hwloc-1.2.1 -endif - -ACLOCAL_AMFLAGS = -I m4 -I hwloc-1.2.1/config +ACLOCAL_AMFLAGS = -I m4 bin_PROGRAMS = htop dist_man_MANS = htop.1 @@ -41,12 +37,6 @@ SUFFIXES = .h BUILT_SOURCES = $(myhtopheaders) htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h -if HAVE_BUNDLED_HWLOC -htop_LDADD = $(HWLOC_EMBEDDED_LDADD) $(HWLOC_EMBEDDED_LIBS) -AM_CFLAGS += $(HWLOC_EMBEDDED_CFLAGS) -AM_CPPFLAGS += $(HWLOC_EMBEDDED_CPPFLAGS) -endif - profile: $(MAKE) all CFLAGS="-pg -O2" @@ -29,7 +29,7 @@ in the source distribution for its full text. #include <sched.h> #include <time.h> -#ifdef HAVE_HWLOC +#ifdef HAVE_LIBHWLOC #include <hwloc/linux.h> #endif @@ -566,7 +566,7 @@ bool Process_setPriority(Process* this, int priority) { return (err == 0); } -#ifdef HAVE_HWLOC +#ifdef HAVE_LIBHWLOC Affinity* Process_getAffinity(Process* this) { hwloc_cpuset_t cpuset = hwloc_bitmap_alloc(); @@ -32,7 +32,7 @@ in the source distribution for its full text. #include <sched.h> #include <time.h> -#ifdef HAVE_HWLOC +#ifdef HAVE_LIBHWLOC #include <hwloc/linux.h> #endif @@ -196,7 +196,7 @@ void Process_toggleTag(Process* this); bool Process_setPriority(Process* this, int priority); -#ifdef HAVE_HWLOC +#ifdef HAVE_LIBHWLOC Affinity* Process_getAffinity(Process* this); diff --git a/ProcessList.c b/ProcessList.c index 0ba17980..be01ca65 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -115,7 +115,7 @@ typedef struct ProcessList_ { int kernelThreads; int runningTasks; - #ifdef HAVE_HWLOC + #ifdef HAVE_LIBHWLOC hwloc_topology_t topology; bool topologyOk; #endif @@ -195,7 +195,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable) { fclose(file); this->cpuCount = cpus - 1; -#ifdef HAVE_HWLOC +#ifdef HAVE_LIBHWLOC this->topologyOk = false; int topoErr = hwloc_topology_init(&this->topology); if (topoErr == 0) { diff --git a/ProcessList.h b/ProcessList.h index 5432c187..641a08c6 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -117,7 +117,7 @@ typedef struct ProcessList_ { int kernelThreads; int runningTasks; - #ifdef HAVE_HWLOC + #ifdef HAVE_LIBHWLOC hwloc_topology_t topology; bool topologyOk; #endif diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index f844c3a3..00000000 --- a/acinclude.m4 +++ /dev/null @@ -1,2 +0,0 @@ -m4_include(hwloc-1.2.1/config/hwloc.m4) -m4_include(hwloc-1.2.1/config/hwloc_pkg.m4) diff --git a/configure.ac b/configure.ac index 514c458d..83a096ee 100644 --- a/configure.ac +++ b/configure.ac @@ -131,32 +131,12 @@ if test "x$enable_native_affinity" = xyes; then [AC_MSG_RESULT([no])]) fi -##### hwloc -AC_ARG_ENABLE(system-hwloc, [AC_HELP_STRING([--enable-system-hwloc], [use the copy of hwloc from your system and not the one bundled with the htop sources. (hwloc required)])], ,enable_system_hwloc="no") -enable_xml=no -AC_ARG_ENABLE(hwloc, [AC_HELP_STRING([--enable-hwloc], [enable hwloc support for CPU affinity])],, test "x$enable_native_affinity" = xno && enable_hwloc="yes") +AC_ARG_ENABLE(hwloc, [AC_HELP_STRING([--enable-hwloc], [enable hwloc support for CPU affinity])],, enable_hwloc="no") if test "x$enable_hwloc" = xyes then - if test "x$enable_system_hwloc" = xyes - then - AC_CHECK_LIB([hwloc], [hwloc_linux_get_tid_cpubind], [], [missing_libraries="$missing_libraries libhwloc"]) - AC_CHECK_HEADERS([hwloc.h],[:], [missing_headers="$missing_headers $ac_header"]) - - else - HWLOC_SETUP_CORE([hwloc-1.2.1], [hwloc_bundled=yes], [hwloc_bundled=no]) - fi + AC_CHECK_LIB([hwloc], [hwloc_linux_get_tid_cpubind], [], [missing_libraries="$missing_libraries libhwloc"]) + AC_CHECK_HEADERS([hwloc.h],[:], [missing_headers="$missing_headers $ac_header"]) fi -HWLOC_DO_AM_CONDITIONALS -AM_CONDITIONAL([HAVE_HWLOC], [test "x$hwloc_bundled" = "xyes" -o "x$hwloc_system" = "xyes"]) -AM_CONDITIONAL([HAVE_BUNDLED_HWLOC], [test "x$hwloc_bundled" = "xyes"]) -if test "x$hwloc_system" = "xyes"; then - AC_DEFINE([HAVE_SYSTEM_HWLOC], 1, [Have system hwloc]) - AC_DEFINE([HAVE_HWLOC], 1, [Have hwloc]) -elif test "x$hwloc_bundled" = "xyes"; then - AC_DEFINE([HAVE_BUNDLED_HWLOC], 1, [Use bundled hwloc]) - AC_DEFINE([HAVE_HWLOC], 1, [Have hwloc]) -fi -##### AC_CONFIG_FILES([Makefile htop.1]) AC_OUTPUT @@ -123,7 +123,7 @@ static void showHelp(ProcessList* pl) { mvaddstr(15, 0, " F9 k: kill process/tagged processes P: sort by CPU%"); mvaddstr(16, 0, " ] F7: higher priority (root only) M: sort by MEM%"); mvaddstr(17, 0, " [ F8: lower priority (+ nice) T: sort by TIME"); -#ifdef HAVE_HWLOC +#if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY) if (pl->cpuCount > 1) mvaddstr(18, 0, " a: set CPU affinity I: invert sort order"); else @@ -144,7 +144,7 @@ static void showHelp(ProcessList* pl) { mvaddstr(16, 0, " ] F7"); mvaddstr(16,40, " M"); mvaddstr(17, 0, " [ F8"); mvaddstr(17,40, " T"); mvaddstr(18,40, " F4 I"); -#if HAVE_HWLOC +#if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY) if (pl->cpuCount > 1) mvaddstr(18, 0, " a:"); #endif @@ -773,7 +773,7 @@ int main(int argc, char** argv) { refreshTimeout = 0; break; } -#if (HAVE_HWLOC || HAVE_NATIVE_AFFINITY) +#if (HAVE_LIBHWLOC || HAVE_NATIVE_AFFINITY) case 'a': { if (pl->cpuCount == 1) diff --git a/hwloc-1.2.1/AUTHORS b/hwloc-1.2.1/AUTHORS deleted file mode 100644 index 837b27f2..00000000 --- a/hwloc-1.2.1/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -Cédric Augonnet <Cedric.Augonnet@labri.fr> -Jérôme Clet-Ortega <Jerome.Clet-Ortega@labri.fr> -Ludovic Courtès <Ludovic.Courtes@inria.fr> -Brice Goglin <Brice.Goglin@inria.fr> -Nathalie Furmento <Nathalie.Furmento@labri.fr> -Samuel Thibault <Samuel.Thibault@labri.fr> -Jeff Squyres <jsquyres@cisco.com> -Alexey Kardashevskiy <aik@au1.ibm.com> diff --git a/hwloc-1.2.1/COPYING b/hwloc-1.2.1/COPYING deleted file mode 100644 index cdbd4f67..00000000 --- a/hwloc-1.2.1/COPYING +++ /dev/null @@ -1,27 +0,0 @@ -Copyright © 2009 CNRS -Copyright © 2009 INRIA. All rights reserved. -Copyright © 2009 Université Bordeaux 1 -Copyright © 2009 Cisco Systems, Inc. All rights reserved. -See COPYING in top-level directory. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/hwloc-1.2.1/Makefile.am b/hwloc-1.2.1/Makefile.am deleted file mode 100644 index de37e341..00000000 --- a/hwloc-1.2.1/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright © 2009 INRIA. All rights reserved. -# Copyright © 2009 Université Bordeaux 1 -# Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. -# See COPYING in top-level directory. - -# Note that the -I directory must *exactly* match what was specified -# via AC_CONFIG_MACRO_DIR in configure.ac. -ACLOCAL_AMFLAGS = -I ./config - -SUBDIRS = src include - -# Do not let automake automatically add the non-standalone dirs to the -# distribution tarball if we're building in embedded mode. -DIST_SUBDIRS = $(SUBDIRS) - -# -# "make distcheck" requires that tarballs are able to be able to "make -# dist", so we have to include config/distscript.csh. -# -EXTRA_DIST = \ - README VERSION COPYING AUTHORS \ - config/hwloc_get_version.sh \ - config/distscript.csh - -# -# Build the top-level README file -# diff --git a/hwloc-1.2.1/Makefile.in b/hwloc-1.2.1/Makefile.in deleted file mode 100644 index 4bed1d18..00000000 --- a/hwloc-1.2.1/Makefile.in +++ /dev/null @@ -1,611 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright © 2009 INRIA. All rights reserved. -# Copyright © 2009 Université Bordeaux 1 -# Copyright © 2009-2010 Cisco Systems, Inc. All rights reserved. -# See COPYING in top-level directory. -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = hwloc-1.2.1 -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - AUTHORS COPYING NEWS -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = \ - $(top_srcdir)/hwloc-1.2.1/config/hwloc_check_attributes.m4 \ - $(top_srcdir)/hwloc-1.2.1/config/hwloc_check_visibility.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/hwloc-1.2.1/config/hwloc.m4 \ - $(top_srcdir)/hwloc-1.2.1/config/hwloc_pkg.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h \ - $(top_builddir)/hwloc-1.2.1/include/private/autogen/config.h \ - $(top_builddir)/hwloc-1.2.1/include/hwloc/autogen/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASH = @BASH@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -HWLOC_CFLAGS = @HWLOC_CFLAGS@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_EMBEDDED_CFLAGS = @HWLOC_EMBEDDED_CFLAGS@ -HWLOC_EMBEDDED_CPPFLAGS = @HWLOC_EMBEDDED_CPPFLAGS@ -HWLOC_EMBEDDED_LD |