From ec17b7029a5f5f2e42d66380762ab24fa5174fc4 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 24 Sep 2011 00:30:47 +0000 Subject: Convert affinity control from the deprecated PLPA to HWLOC --- Affinity.c | 36 + AffinityPanel.c | 23 +- AffinityPanel.h | 7 +- DebugMemory.c | 1 - DebugMemory.h | 1 - Makefile.am | 18 +- Meter.h | 1 - Process.c | 41 +- Process.h | 12 +- ProcessList.c | 14 +- ProcessList.h | 4 + String.h | 1 - TraceScreen.c | 2 +- TraceScreen.h | 2 +- acinclude.m4 | 3 +- configure.ac | 26 +- htop.c | 25 +- hwloc-1.2.1/AUTHORS | 8 + hwloc-1.2.1/COPYING | 27 + hwloc-1.2.1/Makefile.am | 27 + hwloc-1.2.1/Makefile.in | 611 + hwloc-1.2.1/NEWS | 361 + hwloc-1.2.1/README | 688 + hwloc-1.2.1/VERSION | 61 + hwloc-1.2.1/aclocal.m4 | 1040 + hwloc-1.2.1/config/compile | 143 + hwloc-1.2.1/config/config.guess | 1501 ++ hwloc-1.2.1/config/config.sub | 1705 ++ hwloc-1.2.1/config/depcomp | 630 + hwloc-1.2.1/config/distscript.csh | 240 + hwloc-1.2.1/config/hwloc.m4 | 707 + hwloc-1.2.1/config/hwloc_check_attributes.m4 | 533 + hwloc-1.2.1/config/hwloc_check_visibility.m4 | 122 + hwloc-1.2.1/config/hwloc_get_version.sh | 173 + hwloc-1.2.1/config/hwloc_internal.m4 | 408 + hwloc-1.2.1/config/hwloc_pkg.m4 | 187 + hwloc-1.2.1/config/install-sh | 520 + hwloc-1.2.1/config/libtool.m4 | 7831 ++++++++ hwloc-1.2.1/config/ltmain.sh | 9636 +++++++++ hwloc-1.2.1/config/ltoptions.m4 | 369 + hwloc-1.2.1/config/ltsugar.m4 | 123 + hwloc-1.2.1/config/ltversion.m4 | 23 + hwloc-1.2.1/config/lt~obsolete.m4 | 98 + hwloc-1.2.1/config/missing | 376 + hwloc-1.2.1/configure | 22809 ++++++++++++++++++++++ hwloc-1.2.1/configure.ac | 156 + hwloc-1.2.1/hwloc.pc.in | 12 + hwloc-1.2.1/include/Makefile.am | 40 + hwloc-1.2.1/include/Makefile.in | 566 + hwloc-1.2.1/include/hwloc.h | 1707 ++ hwloc-1.2.1/include/hwloc/autogen/config.h | 137 + hwloc-1.2.1/include/hwloc/autogen/config.h.in | 136 + hwloc-1.2.1/include/hwloc/autogen/stamp-h3 | 1 + hwloc-1.2.1/include/hwloc/bitmap.h | 335 + hwloc-1.2.1/include/hwloc/cpuset.h | 75 + hwloc-1.2.1/include/hwloc/cuda.h | 90 + hwloc-1.2.1/include/hwloc/cudart.h | 84 + hwloc-1.2.1/include/hwloc/glibc-sched.h | 119 + hwloc-1.2.1/include/hwloc/helper.h | 1083 + hwloc-1.2.1/include/hwloc/linux-libnuma.h | 462 + hwloc-1.2.1/include/hwloc/linux.h | 64 + hwloc-1.2.1/include/hwloc/myriexpress.h | 107 + hwloc-1.2.1/include/hwloc/openfabrics-verbs.h | 81 + hwloc-1.2.1/include/hwloc/rename.h | 513 + hwloc-1.2.1/include/private/autogen/config.h | 589 + hwloc-1.2.1/include/private/autogen/config.h.in | 588 + hwloc-1.2.1/include/private/autogen/stamp-h2 | 1 + hwloc-1.2.1/include/private/cpuid.h | 72 + hwloc-1.2.1/include/private/debug.h | 54 + hwloc-1.2.1/include/private/misc.h | 331 + hwloc-1.2.1/include/private/private.h | 343 + hwloc-1.2.1/src/Makefile.am | 118 + hwloc-1.2.1/src/Makefile.in | 702 + hwloc-1.2.1/src/bind.c | 552 + hwloc-1.2.1/src/cpuset.c | 1267 ++ hwloc-1.2.1/src/distances.c | 719 + hwloc-1.2.1/src/dolib.c | 37 + hwloc-1.2.1/src/hwloc.dtd | 37 + hwloc-1.2.1/src/misc.c | 100 + hwloc-1.2.1/src/topology-aix.c | 602 + hwloc-1.2.1/src/topology-darwin.c | 216 + hwloc-1.2.1/src/topology-freebsd.c | 201 + hwloc-1.2.1/src/topology-hpux.c | 262 + hwloc-1.2.1/src/topology-linux.c | 2949 +++ hwloc-1.2.1/src/topology-osf.c | 343 + hwloc-1.2.1/src/topology-solaris.c | 667 + hwloc-1.2.1/src/topology-synthetic.c | 335 + hwloc-1.2.1/src/topology-windows.c | 706 + hwloc-1.2.1/src/topology-x86.c | 535 + hwloc-1.2.1/src/topology-xml.c | 700 + hwloc-1.2.1/src/topology.c | 2468 +++ hwloc-1.2.1/src/traversal.c | 350 + plpa-1.3.2/AUTHORS | 13 - plpa-1.3.2/LICENSE | 57 - plpa-1.3.2/Makefile.am | 17 - plpa-1.3.2/NEWS | 148 - plpa-1.3.2/README | 659 - plpa-1.3.2/VERSION | 52 - plpa-1.3.2/plpa.m4 | 364 - plpa-1.3.2/src/Makefile.am | 15 - plpa-1.3.2/src/libplpa/Makefile.am | 36 - plpa-1.3.2/src/libplpa/plpa.h.in | 298 - plpa-1.3.2/src/libplpa/plpa_api_probe.c | 107 - plpa-1.3.2/src/libplpa/plpa_config.h.in | 118 - plpa-1.3.2/src/libplpa/plpa_dispatch.c | 193 - plpa-1.3.2/src/libplpa/plpa_internal.h | 30 - plpa-1.3.2/src/libplpa/plpa_map.c | 1055 - plpa-1.3.2/src/libplpa/plpa_runtime.c | 73 - 108 files changed, 72722 insertions(+), 3299 deletions(-) create mode 100644 Affinity.c create mode 100644 hwloc-1.2.1/AUTHORS create mode 100644 hwloc-1.2.1/COPYING create mode 100644 hwloc-1.2.1/Makefile.am create mode 100644 hwloc-1.2.1/Makefile.in create mode 100644 hwloc-1.2.1/NEWS create mode 100644 hwloc-1.2.1/README create mode 100644 hwloc-1.2.1/VERSION create mode 100644 hwloc-1.2.1/aclocal.m4 create mode 100755 hwloc-1.2.1/config/compile create mode 100755 hwloc-1.2.1/config/config.guess create mode 100755 hwloc-1.2.1/config/config.sub create mode 100755 hwloc-1.2.1/config/depcomp create mode 100755 hwloc-1.2.1/config/distscript.csh create mode 100644 hwloc-1.2.1/config/hwloc.m4 create mode 100644 hwloc-1.2.1/config/hwloc_check_attributes.m4 create mode 100644 hwloc-1.2.1/config/hwloc_check_visibility.m4 create mode 100755 hwloc-1.2.1/config/hwloc_get_version.sh create mode 100644 hwloc-1.2.1/config/hwloc_internal.m4 create mode 100644 hwloc-1.2.1/config/hwloc_pkg.m4 create mode 100755 hwloc-1.2.1/config/install-sh create mode 100644 hwloc-1.2.1/config/libtool.m4 create mode 100755 hwloc-1.2.1/config/ltmain.sh create mode 100644 hwloc-1.2.1/config/ltoptions.m4 create mode 100644 hwloc-1.2.1/config/ltsugar.m4 create mode 100644 hwloc-1.2.1/config/ltversion.m4 create mode 100644 hwloc-1.2.1/config/lt~obsolete.m4 create mode 100755 hwloc-1.2.1/config/missing create mode 100755 hwloc-1.2.1/configure create mode 100644 hwloc-1.2.1/configure.ac create mode 100644 hwloc-1.2.1/hwloc.pc.in create mode 100644 hwloc-1.2.1/include/Makefile.am create mode 100644 hwloc-1.2.1/include/Makefile.in create mode 100644 hwloc-1.2.1/include/hwloc.h create mode 100644 hwloc-1.2.1/include/hwloc/autogen/config.h create mode 100644 hwloc-1.2.1/include/hwloc/autogen/config.h.in create mode 100644 hwloc-1.2.1/include/hwloc/autogen/stamp-h3 create mode 100644 hwloc-1.2.1/include/hwloc/bitmap.h create mode 100644 hwloc-1.2.1/include/hwloc/cpuset.h create mode 100644 hwloc-1.2.1/include/hwloc/cuda.h create mode 100644 hwloc-1.2.1/include/hwloc/cudart.h create mode 100644 hwloc-1.2.1/include/hwloc/glibc-sched.h create mode 100644 hwloc-1.2.1/include/hwloc/helper.h create mode 100644 hwloc-1.2.1/include/hwloc/linux-libnuma.h create mode 100644 hwloc-1.2.1/include/hwloc/linux.h create mode 100644 hwloc-1.2.1/include/hwloc/myriexpress.h create mode 100644 hwloc-1.2.1/include/hwloc/openfabrics-verbs.h create mode 100644 hwloc-1.2.1/include/hwloc/rename.h create mode 100644 hwloc-1.2.1/include/private/autogen/config.h create mode 100644 hwloc-1.2.1/include/private/autogen/config.h.in create mode 100644 hwloc-1.2.1/include/private/autogen/stamp-h2 create mode 100644 hwloc-1.2.1/include/private/cpuid.h create mode 100644 hwloc-1.2.1/include/private/debug.h create mode 100644 hwloc-1.2.1/include/private/misc.h create mode 100644 hwloc-1.2.1/include/private/private.h create mode 100644 hwloc-1.2.1/src/Makefile.am create mode 100644 hwloc-1.2.1/src/Makefile.in create mode 100644 hwloc-1.2.1/src/bind.c create mode 100644 hwloc-1.2.1/src/cpuset.c create mode 100644 hwloc-1.2.1/src/distances.c create mode 100644 hwloc-1.2.1/src/dolib.c create mode 100644 hwloc-1.2.1/src/hwloc.dtd create mode 100644 hwloc-1.2.1/src/misc.c create mode 100644 hwloc-1.2.1/src/topology-aix.c create mode 100644 hwloc-1.2.1/src/topology-darwin.c create mode 100644 hwloc-1.2.1/src/topology-freebsd.c create mode 100644 hwloc-1.2.1/src/topology-hpux.c create mode 100644 hwloc-1.2.1/src/topology-linux.c create mode 100644 hwloc-1.2.1/src/topology-osf.c create mode 100644 hwloc-1.2.1/src/topology-solaris.c create mode 100644 hwloc-1.2.1/src/topology-synthetic.c create mode 100644 hwloc-1.2.1/src/topology-windows.c create mode 100644 hwloc-1.2.1/src/topology-x86.c create mode 100644 hwloc-1.2.1/src/topology-xml.c create mode 100644 hwloc-1.2.1/src/topology.c create mode 100644 hwloc-1.2.1/src/traversal.c delete mode 100644 plpa-1.3.2/AUTHORS delete mode 100644 plpa-1.3.2/LICENSE delete mode 100644 plpa-1.3.2/Makefile.am delete mode 100644 plpa-1.3.2/NEWS delete mode 100644 plpa-1.3.2/README delete mode 100644 plpa-1.3.2/VERSION delete mode 100644 plpa-1.3.2/plpa.m4 delete mode 100644 plpa-1.3.2/src/Makefile.am delete mode 100644 plpa-1.3.2/src/libplpa/Makefile.am delete mode 100644 plpa-1.3.2/src/libplpa/plpa.h.in delete mode 100644 plpa-1.3.2/src/libplpa/plpa_api_probe.c delete mode 100644 plpa-1.3.2/src/libplpa/plpa_config.h.in delete mode 100644 plpa-1.3.2/src/libplpa/plpa_dispatch.c delete mode 100644 plpa-1.3.2/src/libplpa/plpa_internal.h delete mode 100644 plpa-1.3.2/src/libplpa/plpa_map.c delete mode 100644 plpa-1.3.2/src/libplpa/plpa_runtime.c diff --git a/Affinity.c b/Affinity.c new file mode 100644 index 00000000..0b2bd465 --- /dev/null +++ b/Affinity.c @@ -0,0 +1,36 @@ + +#include "config.h" +#include "Affinity.h" +#include + +/*{ + +typedef struct Affinity_ { + int size; + int used; + int* cpus; +} Affinity; + +}*/ + +Affinity* Affinity_new() { + Affinity* this = calloc(sizeof(Affinity), 1); + this->size = 8; + this->cpus = calloc(sizeof(int), this->size); + return this; +} + +void Affinity_delete(Affinity* this) { + free(this->cpus); + free(this); +} + +void Affinity_add(Affinity* this, int id) { + if (this->used == this->size) { + this->size *= 2; + this->cpus = realloc(this->cpus, sizeof(int) * this->size); + } + this->cpus[this->used] = id; + this->used++; +} + diff --git a/AffinityPanel.c b/AffinityPanel.c index b3ea4123..504638e7 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -1,9 +1,8 @@ +#include "ProcessList.h" #include "AffinityPanel.h" - #include "Panel.h" #include "CheckItem.h" -#include "ProcessList.h" #include "debug.h" #include @@ -26,25 +25,33 @@ static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) { return result; } -Panel* AffinityPanel_new(ProcessList* pl, unsigned long mask) { +Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity) { Panel* this = Panel_new(1, 1, 1, 1, CHECKITEM_CLASS, true, ListItem_compare); this->eventHandler = AffinityPanel_eventHandler; Panel_setHeader(this, "Use CPUs:"); + int curCpu = 0; for (int i = 0; i < pl->cpuCount; i++) { char number[10]; snprintf(number, 9, "%d", ProcessList_cpuId(pl, i)); - Panel_add(this, (Object*) CheckItem_new(String_copy(number), NULL, mask & (1 << i))); + bool mode; + if (curCpu < affinity->used && affinity->cpus[curCpu] == i) { + mode = true; + curCpu++; + } else { + mode = false; + } + Panel_add(this, (Object*) CheckItem_new(String_copy(number), NULL, mode)); } return this; } -unsigned long AffinityPanel_getAffinity(Panel* this) { +Affinity* AffinityPanel_getAffinity(Panel* this) { + Affinity* affinity = Affinity_new(); int size = Panel_size(this); - unsigned long mask = 0; for (int i = 0; i < size; i++) { if (CheckItem_get((CheckItem*)Panel_get(this, i))) - mask = mask | (1 << i); + Affinity_add(affinity, i); } - return mask; + return affinity; } diff --git a/AffinityPanel.h b/AffinityPanel.h index 4324610b..8ab39633 100644 --- a/AffinityPanel.h +++ b/AffinityPanel.h @@ -3,16 +3,15 @@ #ifndef HEADER_AffinityPanel #define HEADER_AffinityPanel - +#include "ProcessList.h" #include "Panel.h" #include "CheckItem.h" -#include "ProcessList.h" #include "debug.h" #include -Panel* AffinityPanel_new(ProcessList* pl, unsigned long mask); +Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity); -unsigned long AffinityPanel_getAffinity(Panel* this); +Affinity* AffinityPanel_getAffinity(Panel* this); #endif diff --git a/DebugMemory.c b/DebugMemory.c index f9f38e70..7a0f584d 100644 --- a/DebugMemory.c +++ b/DebugMemory.c @@ -1,5 +1,4 @@ -#define _GNU_SOURCE #include #include #include diff --git a/DebugMemory.h b/DebugMemory.h index ea262089..a67a5f2b 100644 --- a/DebugMemory.h +++ b/DebugMemory.h @@ -3,7 +3,6 @@ #ifndef HEADER_DebugMemory #define HEADER_DebugMemory -#define _GNU_SOURCE #include #include #include diff --git a/Makefile.am b/Makefile.am index 9bf73e48..57651a93 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,9 @@ -if HAVE_PLPA -SUBDIRS = plpa-1.3.2 +if HAVE_HWLOC +SUBDIRS = hwloc-1.2.1 endif -ACLOCAL_AMFLAGS=-I m4 +ACLOCAL_AMFLAGS = -I m4 -I hwloc-1.2.1/config bin_PROGRAMS = htop dist_man_MANS = htop.1 @@ -15,6 +15,7 @@ pixmapdir = $(datadir)/pixmaps pixmap_DATA = htop.png htop_CFLAGS = -pedantic -Wall -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED +AM_CFLAGS = AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" myhtopsources = AvailableMetersPanel.c CategoriesPanel.c CheckItem.c \ @@ -24,7 +25,7 @@ LoadAverageMeter.c MemoryMeter.c Meter.c MetersPanel.c Object.c Panel.c \ BatteryMeter.c Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \ SignalItem.c SignalsPanel.c String.c SwapMeter.c TasksMeter.c TraceScreen.c \ UptimeMeter.c UsersTable.c Vector.c AvailableColumnsPanel.c AffinityPanel.c \ -HostnameMeter.c OpenFilesScreen.c +HostnameMeter.c OpenFilesScreen.c Affinity.c myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \ CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \ @@ -33,14 +34,17 @@ Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \ BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \ ScreenManager.h Settings.h SignalItem.h SignalsPanel.h String.h \ SwapMeter.h TasksMeter.h TraceScreen.h UptimeMeter.h UsersTable.h Vector.h \ -Process.h AffinityPanel.h HostnameMeter.h OpenFilesScreen.h +Process.h AffinityPanel.h HostnameMeter.h OpenFilesScreen.h Affinity.h SUFFIXES = .h BUILT_SOURCES = $(myhtopheaders) htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h -if HAVE_PLPA -htop_LDADD = $(top_builddir)/plpa-1.3.2/src/libplpa/libplpa_included.la + +if HAVE_HWLOC +htop_LDADD = $(HWLOC_EMBEDDED_LDADD) $(HWLOC_EMBEDDED_LIBS) +AM_CFLAGS += $(HWLOC_EMBEDDED_CFLAGS) +AM_CPPFLAGS += $(HWLOC_EMBEDDED_CPPFLAGS) endif profile: diff --git a/Meter.h b/Meter.h index e1cd6c3c..dc550e4d 100644 --- a/Meter.h +++ b/Meter.h @@ -9,7 +9,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define _GNU_SOURCE #include "RichString.h" #include "Object.h" #include "CRT.h" diff --git a/Process.c b/Process.c index 8cb40a8d..527db75d 100644 --- a/Process.c +++ b/Process.c @@ -5,13 +5,13 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define _GNU_SOURCE #include "ProcessList.h" #include "Object.h" #include "CRT.h" #include "String.h" #include "Process.h" #include "RichString.h" +#include "Affinity.h" #include "debug.h" @@ -29,8 +29,8 @@ in the source distribution for its full text. #include #include -#ifdef HAVE_PLPA -#include +#ifdef HAVE_HWLOC +#include #endif // This works only with glibc 2.1+. On earlier versions @@ -535,15 +535,36 @@ bool Process_setPriority(Process* this, int priority) { return (err == 0); } -#ifdef HAVE_PLPA -unsigned long Process_getAffinity(Process* this) { - unsigned long mask = 0; - plpa_sched_getaffinity(this->pid, sizeof(unsigned long), (plpa_cpu_set_t*) &mask); - return mask; +#ifdef HAVE_HWLOC +Affinity* Process_getAffinity(Process* this) { + hwloc_cpuset_t cpuset = hwloc_bitmap_alloc(); + bool ok = (hwloc_linux_get_tid_cpubind(this->pl->topology, this->pid, cpuset) == 0); + Affinity* affinity = NULL; + if (ok) { + affinity = Affinity_new(); + if (hwloc_bitmap_last(cpuset) == -1) { + for (int i = 0; i < this->pl->cpuCount; i++) { + Affinity_add(affinity, i); + } + } else { + unsigned int id; + hwloc_bitmap_foreach_begin(id, cpuset); + Affinity_add(affinity, id); + hwloc_bitmap_foreach_end(); + } + } + hwloc_bitmap_free(cpuset); + return affinity; } -bool Process_setAffinity(Process* this, unsigned long mask) { - return (plpa_sched_setaffinity(this->pid, sizeof(unsigned long), (plpa_cpu_set_t*) &mask) == 0); +bool Process_setAffinity(Process* this, Affinity* affinity) { + hwloc_cpuset_t cpuset = hwloc_bitmap_alloc(); + for (int i = 0; i < affinity->used; i++) { + hwloc_bitmap_set(cpuset, affinity->cpus[i]); + } + bool ok = (hwloc_linux_set_tid_cpubind(this->pl->topology, this->pid, cpuset) == 0); + hwloc_bitmap_free(cpuset); + return ok; } #endif diff --git a/Process.h b/Process.h index ec0855a0..64558681 100644 --- a/Process.h +++ b/Process.h @@ -9,12 +9,12 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define _GNU_SOURCE #include "ProcessList.h" #include "Object.h" #include "CRT.h" #include "String.h" #include "RichString.h" +#include "Affinity.h" #include "debug.h" @@ -32,8 +32,8 @@ in the source distribution for its full text. #include #include -#ifdef HAVE_PLPA -#include +#ifdef HAVE_HWLOC +#include #endif // This works only with glibc 2.1+. On earlier versions @@ -193,10 +193,10 @@ void Process_toggleTag(Process* this); bool Process_setPriority(Process* this, int priority); -#ifdef HAVE_PLPA -unsigned long Process_getAffinity(Process* this); +#ifdef HAVE_HWLOC +Affinity* Process_getAffinity(Process* this); -bool Process_setAffinity(Process* this, unsigned long mask); +bool Process_setAffinity(Process* this, Affinity* affinity); #endif void Process_sendSignal(Process* this, int sgn); diff --git a/ProcessList.c b/ProcessList.c index c200eb91..f3cc40f1 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -101,6 +101,10 @@ typedef struct ProcessList_ { int kernelThreads; int runningTasks; + #ifdef HAVE_HWLOC + hwloc_topology_t topology; + bool topologyOk; + #endif CPUData* cpus; unsigned long long int totalMem; @@ -155,7 +159,15 @@ ProcessList* ProcessList_new(UsersTable* usersTable) { } while (String_startsWith(buffer, "cpu")); fclose(file); this->cpuCount = cpus - 1; - + +#ifdef HAVE_HWLOC + this->topologyOk = false; + int topoErr = hwloc_topology_init(&this->topology); + if (topoErr == 0) { + topoErr = hwloc_topology_load(this->topology); + this->topologyOk = true; + } +#endif this->cpus = calloc(sizeof(CPUData), cpus); for (int i = 0; i < cpus; i++) { diff --git a/ProcessList.h b/ProcessList.h index c7bc5aca..e68ca49e 100644 --- a/ProcessList.h +++ b/ProcessList.h @@ -101,6 +101,10 @@ typedef struct ProcessList_ { int kernelThreads; int runningTasks; + #ifdef HAVE_HWLOC + hwloc_topology_t topology; + bool topologyOk; + #endif CPUData* cpus; unsigned long long int totalMem; diff --git a/String.h b/String.h index e8de7dcf..1d1534f7 100644 --- a/String.h +++ b/String.h @@ -9,7 +9,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define _GNU_SOURCE #include #include #include diff --git a/TraceScreen.c b/TraceScreen.c index 3af12e28..d66d20a2 100644 --- a/TraceScreen.c +++ b/TraceScreen.c @@ -5,7 +5,7 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define _GNU_SOURCE +#include "config.h" #include #include #include diff --git a/TraceScreen.h b/TraceScreen.h index d2904a7e..7c509d27 100644 --- a/TraceScreen.h +++ b/TraceScreen.h @@ -9,7 +9,7 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define _GNU_SOURCE +#include "config.h" #include #include #include diff --git a/acinclude.m4 b/acinclude.m4 index 8f20ba4e..f844c3a3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1 +1,2 @@ -m4_include(plpa-1.3.2/plpa.m4) +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 d32fbb0f..b63ef6b6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,14 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.57) +AC_PREREQ(2.65) AC_INIT([htop],[0.9.1],[loderunner@users.sourceforge.net]) -AM_INIT_AUTOMAKE + +# The following two lines are required by hwloc scripts +AC_USE_SYSTEM_EXTENSIONS +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE([1.11]) AC_CONFIG_SRCDIR([htop.c]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -105,14 +110,19 @@ AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) fi -AC_ARG_ENABLE(plpa, [AC_HELP_STRING([--enable-plpa], [enable PLPA support for CPU affinity])], ,enable_plpa="yes") -PLPA_INCLUDED -PLPA_INIT([plpa-1.3.2], [plpa_happy=yes], [plpa_happy=no]) -AM_CONDITIONAL([HAVE_PLPA], [test "$plpa_happy" = "yes" && test "$enable_plpa" = "yes"]) -if test "$plpa_happy" = "yes" && test "$enable_plpa" = "yes" +##### hwloc +enable_xml=no +AC_ARG_ENABLE(hwloc, [AC_HELP_STRING([--enable-hwloc], [enable hwloc support for CPU affinity])],, enable_hwloc="yes") +if test "x$enable_hwloc" = xyes then - AC_DEFINE([HAVE_PLPA], [1], [Have plpa]) + HWLOC_SETUP_CORE([hwloc-1.2.1], [hwloc_happy=yes], [hwloc_happy=no]) +fi +HWLOC_DO_AM_CONDITIONALS +AM_CONDITIONAL([HAVE_HWLOC], [test "x$hwloc_happy" = "xyes"]) +if test "x$hwloc_happy" = "xyes"; then + AC_DEFINE([HAVE_HWLOC], 1, [Have hwloc]) fi +##### AC_CONFIG_FILES([Makefile htop.1]) AC_OUTPUT diff --git a/htop.c b/htop.c index 003e3cd0..25943b56 100644 --- a/htop.c +++ b/htop.c @@ -124,7 +124,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_PLPA +#ifdef HAVE_HWLOC if (pl->cpuCount > 1) mvaddstr(18, 0, " a: set CPU affinity I: invert sort order"); else @@ -145,7 +145,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_PLPA +#if HAVE_HWLOC if (pl->cpuCount > 1) mvaddstr(18, 0, " a:"); #endif @@ -457,7 +457,8 @@ int main(int argc, char** argv) { Panel_draw(panel, true); int prev = ch; - move(LINES-1, CRT_cursorX); + if (incMode) + move(LINES-1, CRT_cursorX); ch = getch(); if (ch == ERR) { @@ -748,35 +749,36 @@ int main(int argc, char** argv) { refreshTimeout = 0; break; } -#ifdef HAVE_PLPA +#ifdef HAVE_HWLOC case 'a': { if (pl->cpuCount == 1) break; - unsigned long curr = Process_getAffinity((Process*) Panel_getSelected(panel)); - - Panel* affinityPanel = AffinityPanel_new(pl, curr); + Affinity* affinity = Process_getAffinity((Process*) Panel_getSelected(panel)); + Panel* affinityPanel = AffinityPanel_new(pl, affinity); + Affinity_delete(affinity); const char* fuFunctions[] = {"Set ", "Cancel ", NULL}; void* set = pickFromVector(panel, affinityPanel, 15, headerHeight, fuFunctions, defaultBar, header); if (set) { - unsigned long new = AffinityPanel_getAffinity(affinityPanel); + Affinity* affinity = AffinityPanel_getAffinity(affinityPanel); bool anyTagged = false; bool ok = true; for (int i = 0; i < Panel_size(panel); i++) { Process* p = (Process*) Panel_get(panel, i); if (p->tag) { - ok = Process_setAffinity(p, new) && ok; + ok = Process_setAffinity(p, affinity) && ok; anyTagged = true; } } if (!anyTagged) { Process* p = (Process*) Panel_getSelected(panel); - ok = Process_setAffinity(p, new) && ok; + ok = Process_setAffinity(p, affinity) && ok; } if (!ok) beep(); + Affinity_delete(affinity); } Panel_delete((Object*)affinityPanel); ProcessList_printHeader(pl, Panel_getHeader(panel)); @@ -895,9 +897,6 @@ int main(int argc, char** argv) { ((Object*)killPanel)->delete((Object*)killPanel); UsersTable_delete(ut); Settings_delete(settings); -#ifdef HAVE_PLPA - plpa_finalize(); -#endif debug_done(); return 0; } diff --git a/hwloc-1.2.1/AUTHORS b/hwloc-1.2.1/AUTHORS new file mode 100644 index 00000000..837b27f2 --- /dev/null +++ b/hwloc-1.2.1/AUTHORS @@ -0,0 +1,8 @@ +Cédric Augonnet +Jérôme Clet-Ortega +Ludovic Courtès +Brice Goglin +Nathalie Furmento +Samuel Thibault +Jeff Squyres +Alexey Kardashevskiy diff --git a/hwloc-1.2.1/COPYING b/hwloc-1.2.1/COPYING new file mode 100644 index 00000000..cdbd4f67 --- /dev/null +++ b/hwloc-1.2.1/COPYING @@ -0,0 +1,27 @@ +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 new file mode 100644 index 00000000..de37e341 --- /dev/null +++ b/hwloc-1.2.1/Makefile.am @@ -0,0 +1,27 @@ +# 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 new file mode 100644 index 00000000..4bed1d18 --- /dev/null +++ b/hwloc-1.2.1/Makefile.in @@ -0,0 +1,611 @@ +# 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_LDADD = @HWLOC_EMBEDDED_LDADD@ +HWLOC_EMBEDDED_LIBS = @HWLOC_EMBEDDED_LIBS@ +HWLOC_HAVE_XML = @HWLOC_HAVE_XML@ +HWLOC_KERRIGHED_CFLAGS = @HWLOC_KERRIGHED_CFLAGS@ +HWLOC_KERRIGHED_LIBS = @HWLOC_KERRIGHED_LIBS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +HWLOC_LINUX_LIBNUMA_LIBS = @HWLOC_LINUX_LIBNUMA_LIBS@ +HWLOC_MS_LIB = @HWLOC_MS_LIB@ +HWLOC_PKG_CONFIG = @HWLOC_PKG_CONFIG@ +HWLOC_REQUIRES = @HWLOC_REQUIRES@ +HWLOC_XML_CFLAGS = @HWLOC_XML_CFLAGS@ +HWLOC_XML_LIBS = @HWLOC_XML_LIBS@ +HWLOC_top_builddir = @HWLOC_top_builddir@ +HWLOC_top_srcdir = @HWLOC_top_srcdir@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# 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 + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hwloc-1.2.1/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu hwloc-1.2.1/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# +# Build the top-level README file +# + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/hwloc-1.2.1/NEWS b/hwloc-1.2.1/NEWS new file mode 100644 index 00000000..740df156 --- /dev/null +++ b/hwloc-1.2.1/NEWS @@ -0,0 +1,361 @@ +Copyright © 2009 CNRS +Copyright © 2009-2011 INRIA. All rights reserved. +Copyright © 2009-2011 Université Bordeaux 1 +Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. + +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +=========================================================================== + +This file contains the main features as well as overviews of specific +bug fixes (and other actions) for each version of hwloc since version +0.9 (as initially released as "libtopology", then re-branded to "hwloc" +in v0.9.1). + + +Version 1.2.1 +------------- +* Improve support of AMD Bulldozer "Compute-Unit" modules by detecting + logical processors with different core IDs on Linux. +* Fix hwloc-ps crash when listing processes from another Linux cpuset. + Thanks to Carl Smith for reporting the problem. +* Fix build on AIX and Solaris. Thanks to Carl Smith and Andreas Kupries + for reporting the problems. +* Fix cache size detection on Darwin. Thanks to Erkcan Özcan for reporting + the problem. +* Make configure fail if --enable-xml or --enable-cairo is given and + proper support cannot be found. Thanks to Andreas Kupries for reporting + the XML problem. +* Fix spurious L1 cache detection on AIX. Thanks to Hendryk Bockelmann + for reporting the problem. +* Fix hwloc_get_last_cpu_location(THREAD) on Linux. Thanks to Gabriele + Fatigati for reporting the problem. +* Fix object distance detection on Solaris. +* Add pthread_self weak symbol to ease static linking. +* Minor documentation fixes. + + +Version 1.2.0 +------------- +* Major features + + Expose latency matrices in the API as an array of distance structures + within objects. Add several helpers to find distances. + + Add hwloc_topology_set_distance_matrix() and environment variables + to provide a matrix of distances between a given set of objects. + + Add hwloc_get_last_cpu_location() and hwloc_get_proc_last_cpu_location() + to retrieve the processors where a process or thread recently ran. + - Add the corresponding --get-last-cpu-location option to hwloc-bind. + + Add hwloc_topology_restrict() to restrict an existing topology to a + given cpuset. + - Add the corresponding --restrict option to lstopo. +* Minor API updates + + Add hwloc_bitmap_list_sscanf/snprintf/asprintf to convert between bitmaps + and strings such as 4-5,7-9,12,15- + + hwloc_bitmap_set/clr_range() now support infinite ranges. + + Clarify the difference between inserting Misc objects by cpuset or by + parent. + + hwloc_insert_misc_object_by_cpuset() now returns NULL in case of error. +* Discovery improvements + + x86 backend (for freebsd): add x2APIC support + + Support standard device-tree phandle, to get better support on e.g. ARM + systems providing it. + + Detect cache size on AIX. Thanks Christopher and IBM. + + Improve grouping to support asymmetric topologies. +* Tools + + Command-line tools now support "all" and "root" special locations + consisting in the entire topology, as well as type names with depth + attributes such as L2 or Group4. + + hwloc-calc improvements: + - Add --number-of/-N option to report the number of objects of a given + type or depth. + - -I is now equivalent to --intersect for listing the indexes of + objects of a given type or depth that intersects the input. + - Add -H to report the output as a hierarchical combination of types + and depths. + + Add --thissystem to lstopo. + + Add lstopo-win, a console-less lstopo variant on Windows. +* Miscellaneous + + Remove C99 usage from code base. + + Rename hwloc-gather-topology.sh into hwloc-gather-topology + + Fix AMD cache discovery on freebsd when there is no L3 cache, thanks + Andriy Gapon for the fix. + + +Version 1.1.2 +------------- +* Fix a segfault in the distance-based grouping code when some objects + are not placed in any group. Thanks to Bernd Kallies for reporting + the problem and providing a patch. +* Fix the command-line parsing of hwloc-bind --mempolicy interleave. + Thanks to Guy Streeter for reporting the problem. +* Stop truncating the output in hwloc_obj_attr_snprintf() and in the + corresponding lstopo output. Thanks to Guy Streeter for reporting the + problem. +* Fix object levels ordering in synthetic topologies. +* Fix potential incoherency between device tree and kernel information, + when SMT is disabled on Power machines. +* Fix and document the behavior of hwloc_topology_set_synthetic() in case + of invalid argument. Thanks to Guy Streeter for reporting the problem. +* Add some verbose error message reporting when it looks like the OS + gives erroneous information. +* Do not include unistd.h and stdint.h in public headers on Windows. +* Move config.h files into their own subdirectories to avoid name + conflicts when AC_CONFIG_HEADERS adds -I's for them. +* Remove the use of declaring variables inside "for" loops. +* Some other minor fixes. +* Many minor documentation fixes. + + +Version 1.1.1 +------------- +* Add hwloc_get_api_version() which returns the version of hwloc used + at runtime. Thanks to Guy Streeter for the suggestion. +* Fix the number of hugepages reported for NUMA nodes on Linux. +* Fix hwloc_bitmap_to_ulong() right after allocating the bitmap. + Thanks to Bernd Kallies for reporting the problem. +* Fix hwloc_bitmap_from_ith_ulong() to properly zero the first ulong. + Thanks to Guy Streeter for reporting the problem. +* Fix hwloc_get_membind_nodeset() on Linux. + Thanks to Bernd Kallies for reporting the problem and providing a patch. +* Fix some file descriptor leaks in the Linux discovery. +* Fix the minimum width of NUMA nodes, caches and the legend in the graphical + lstopo output. Thanks to Jirka Hladky for reporting the problem. +* Various fixes to bitmap conversion from/to taskset-strings. +* Fix and document snprintf functions behavior when the buffer size is too + small or zero. Thanks to Guy Streeter for reporting the problem. +* Fix configure to avoid spurious enabling of the cpuid backend. + Thanks to Tim Anderson for reporting the problem. +* Cleanup error management in hwloc-gather-topology.sh. + Thanks to Jirka Hladky for reporting the problem and providing a patch. +* Add a manpage and usage for hwloc-gather-topology.sh on Linux. + Thanks to Jirka Hladky for providing a patch. +* Memory binding documentation enhancements. + + +Version 1.1.0 +------------- + +* API + + Increase HWLOC_API_VERSION to 0x00010100 so that API changes may be + detected at build-time. + + Add a memory binding interface. + + The cpuset API (hwloc/cpuset.h) is now deprecated. It is replaced by + the bitmap API (hwloc/bitmap.h) which offers the same features with more + generic names since it applies to CPU sets, node sets and more. + Backward compatibility with the cpuset API and ABI is still provided but + it will be removed in a future release. + Old types (hwloc_cpuset_t, ...) are still available as a way to clarify + what kind of hwloc_bitmap_t each API function manipulates. + Upgrading to the new API only requires to replace hwloc_cpuset_ function + calls with the corresponding hwloc_bitmap_ calls, with the following + renaming exceptions: + - hwloc_cpuset_cpu -> hwloc_bitmap_only + - hwloc_cpuset_all_but_cpu -> hwloc_bitmap_allbut + - hwloc_cpuset_from_string -> hwloc_bitmap_sscanf + + Add an `infos' array in each object to store couples of info names and + values. It enables generic storage of things like the old dmi board infos + that were previously stored in machine specific attributes. + + Add linesize cache attribute. +* Features + + Bitmaps (and thus CPU sets and node sets) are dynamically (re-)allocated, + the maximal number of CPUs (HWLOC_NBMAXCPUS) has been removed. + + Improve the distance-based grouping code to better support irregular + distance matrices. + + Add support for device-tree to get cache information (useful on Power + architectures). +* Helpers + + Add NVIDIA CUDA helpers in cuda.h and cudart.h to ease interoperability + with CUDA Runtime and Driver APIs. + + Add Myrinet Express helper in myriexpress.h to ease interoperability. +* Tools + + lstopo now displays physical/OS indexes by default in graphical mode + (use -l to switch back to logical indexes). The textual output still uses + logical by default (use -p to switch to physical indexes). + + lstopo prefixes logical indexes with `L#' and physical indexes with `P#'. + Physical indexes are also printed as `P#N' instead of `phys=N' within + object attributes (in parentheses). + + Add a legend at the bottom of the lstopo graphical output, use --no-legend + to remove it. + + Add hwloc-ps to list process' bindings. + + Add --membind and --mempolicy options to hwloc-bind. + + Improve tools command-line options by adding a generic --input option + (and more) which replaces the old --xml, --synthetic and --fsys-root. + + Cleanup lstopo output configuration by adding --output-format. + + Add --intersect in hwloc-calc, and replace --objects with --largest. + + Add the ability to work on standard input in hwloc-calc. + + Add --from, --to and --at in hwloc-distrib. + + Add taskset-specific functions and command-line tools options to + manipulate CPU set strings in the format of the taskset program. + + Install hwloc-gather-topology.sh on Linux. + + +Version 1.0.3 +------------- + +* Fix support for Linux cpuset when emulated by a cgroup mount point. +* Remove unneeded runtime dependency on libibverbs.so in the library and + all utils programs. +* Fix hwloc_cpuset_to_linux_libnuma_ulongs in case of non-linear OS-indexes + for NUMA nodes. +* lstopo now displays physical/OS indexes by default in graphical mode + (use -l to switch back to logical indexes). The textual output still uses + logical by default (use -p to switch to physical indexes). + + +Version 1.0.2 +------------- + +* Public headers can now be included directly from C++ programs. +* Solaris fix for non-contiguous cpu numbers. Thanks to Rolf vandeVaart for + reporting the issue. +* Darwin 10.4 fix. Thanks to Olivier Cessenat for reporting the issue. +* Revert 1.0.1 patch that ignored sockets with unknown ID values since it + only slightly helped POWER7 machines with old Linux kernels while it + prevents recent kernels from getting the complete POWER7 topology. +* Fix hwloc_get_common_ancestor_obj(). +* Remove arch-specific bits in public headers. +* Some fixes in the lstopo graphical output. +* Various man page clarifications and minor updates. + + +Version 1.0.1 +------------- + +* Various Solaris fixes. Thanks to Yannick Martin for reporting the issue. +* Fix "non-native" builds on x86 platforms (e.g., when building 32 + bit executables with compilers that natively build 64 bit). +* Ignore sockets with unknown ID values (which fixes issues on POWER7 + machines). Thanks to Greg Bauer for reporting the issue. +* Various man page clarifications and minor updates. +* Fixed memory leaks in hwloc_setup_group_from_min_distance_clique(). +* Fix cache type filtering on MS Windows 7. Thanks to Αλέξανδρος + Παπαδογιαννάκ for reporting the issue. +* Fixed warnings when compiling with -DNDEBUG. + + +Version 1.0.0 +------------- + +* The ABI of the library has changed. +* Backend updates + + Add FreeBSD support. + + Add x86 cpuid based backend. + + Add Linux cgroup support to the Linux cpuset code. + + Support binding of entire multithreaded process on Linux. + + Fix and enable Group support in Windows. + + Cleanup XML export/import. +* Objects + + HWLOC_OBJ_PROC is renamed into HWLOC_OBJ_PU for "Processing Unit", + its stringified type name is now "PU". + + Use new HWLOC_OBJ_GROUP objects instead of MISC when grouping + objects according to NUMA distances or arbitrary OS aggregation. + + Rework memory attributes. + + Add different cpusets in each object to specify processors that + are offline, unavailable, ... + + Cleanup the storage of object names and DMI infos. +* Features + + Add support for looking up specific PID topology information. + + Add hwloc_topology_export_xml() to export the topology in a XML file. + + Add hwloc_topology_get_support() to retrieve the supported features + for the current topology context. + + Support non-SYSTEM object as the root of the tree, use MACHINE in + most common cases. + + Add hwloc_get_*cpubind() routines to retrieve the current binding + of processes and threads. +* API + + Add HWLOC_API_VERSION to help detect the currently used API version. + + Add missing ending "e" to *compare* functions. + + Add several routines to emulate PLPA functions. + + Rename and rework the cpuset and/or/xor/not/clear operators to output + their result in a dedicated argument instead of modifying one input. + + Deprecate hwloc_obj_snprintf() in favor of hwloc_obj_type/attr_snprintf(). + + Clarify the use of parent and ancestor in the API, do not use father. + + Replace hwloc_get_system_obj() with hwloc_get_root_obj(). + + Return -1 instead of HWLOC_OBJ_TYPE_MAX in the API since the latter + isn't public. + + Relax constraints in hwloc_obj_type_of_string(). + + Improve displaying of memory sizes. + + Add 0x prefix to cpuset strings. +* Tools + + lstopo now displays logical indexes by default, use --physical to + revert back to OS/physical indexes. + + Add colors in the lstopo graphical outputs to distinguish between online, + offline, reserved, ... objects. + + Extend lstopo to show cpusets, filter objects by type, ... + + Renamed hwloc-mask into hwloc-calc which supports many new options. +* Documentation + + Add a hwloc(7) manpage containing general information. + + Add documentation about how to switch from PLPA to hwloc. + + Cleanup the distributed documentation files. +* Miscellaneous + + Many compilers warning fixes. + + Cleanup the ABI by using the visibility attribute. + + Add project embedding support. + + +Version 0.9.4 (unreleased) +-------------------------- + +* Fix reseting colors to normal in lstopo -.txt output. +* Fix Linux pthread_t binding error report. + + +Version 0.9.3 +------------- + +* Fix autogen.sh to work with Autoconf 2.63. +* Fix