diff --git a/.gitignore b/.gitignore index 5c3cce0..48a3f7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /numatop_linux_1.0.1.tar.gz +/numatop_linux_1.0.2.tar.gz diff --git a/numatop.cpuid.patch b/numatop.cpuid.patch deleted file mode 100644 index 742fe9d..0000000 --- a/numatop.cpuid.patch +++ /dev/null @@ -1,171 +0,0 @@ -diff --git a/Makefile b/Makefile -index 15bab5e..100944f 100644 ---- a/Makefile -+++ b/Makefile -@@ -5,6 +5,7 @@ PROG = numatop - CC = gcc - LD = gcc - CFLAGS = -g -Wall -O2 -+LDFLAGS = -g - LDLIBS = -lncurses -lpthread -lnuma - - COMMON_OBJS = cmd.o disp.o lwp.o numatop.o page.o perf.o \ -@@ -18,7 +19,7 @@ INTEL_OBJS = wsm.o snb.o nhm.o - all: $(PROG) - - $(PROG): $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS) -- $(LD) -o $@ $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS) $(LDLIBS) -+ $(LD) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(OS_OBJS) $(INTEL_OBJS) $(LDLIBS) - - %.o: ./common/%.c ./common/include/*.h ./common/include/os/*.h - $(CC) $(CFLAGS) -o $@ -c $< -diff --git a/common/numatop.c b/common/numatop.c -index 03a7d66..0bdfaa1 100644 ---- a/common/numatop.c -+++ b/common/numatop.c -@@ -72,7 +72,7 @@ main(int argc, char *argv[]) - { - int ret = 1, debug_level = 0; - FILE *log = NULL, *dump = NULL; -- boolean_t locked; -+ boolean_t locked = B_FALSE; - char c; - - if (!os_authorized()) { -diff --git a/common/os/os_win.c b/common/os/os_win.c -index b80bcdf..1fb1781 100644 ---- a/common/os/os_win.c -+++ b/common/os/os_win.c -@@ -889,11 +889,11 @@ latnode_data_show(track_proc_t *proc, dyn_latnode_t *dyn, map_entry_t *entry, - win_size2str(dyn->size, size_str, sizeof (size_str)); - if (lwp != NULL) { - (void) snprintf(content, sizeof (content), -- "Memory area(%lX, %s), thread(%d)", -+ "Memory area(%"PRIX64", %s), thread(%d)", - dyn->addr, size_str, lwp->id); - } else { - (void) snprintf(content, sizeof (content), -- "Memory area(%lX, %s), process(%d)", -+ "Memory area(%"PRIX64", %s), process(%d)", - dyn->addr, size_str, proc->pid); - } - -diff --git a/common/util.c b/common/util.c -index eab06b3..e9afea9 100644 ---- a/common/util.c -+++ b/common/util.c -@@ -126,7 +126,7 @@ debug_print(FILE *out, int level, const char *fmt, ...) - if (s_logfile != NULL) { - (void) pthread_mutex_lock(&s_debug_ctl.mutex); - (void) fprintf(s_logfile, -- "%lu: ", current_ms() / 1000); -+ "%"PRIu64": ", current_ms() / 1000); - va_start(ap, fmt); - (void) vfprintf(s_logfile, fmt, ap); - va_end(ap); -@@ -137,7 +137,7 @@ debug_print(FILE *out, int level, const char *fmt, ...) - } else { - (void) pthread_mutex_lock(&s_debug_ctl.mutex); - (void) fprintf(out, -- "%lu: ", current_ms() / 1000); -+ "%"PRIu64": ", current_ms() / 1000); - va_start(ap, fmt); - (void) vfprintf(out, fmt, ap); - va_end(ap); -@@ -319,6 +319,7 @@ static void - cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, - unsigned int *edx) - { -+#if __x86_64 - __asm volatile( - "cpuid\n\t" - :"=a" (*eax), -@@ -326,6 +327,19 @@ cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, - "=c" (*ecx), - "=d" (*edx) - :"a" (*eax)); -+#else -+ __asm volatile( -+ "push %%ebx\n\t" -+ "cpuid\n\t" -+ "mov %%ebx, (%4)\n\t" -+ "pop %%ebx" -+ :"=a" (*eax), -+ "=c" (*ecx), -+ "=d" (*edx) -+ :"0" (*eax), -+ "S" (ebx) -+ :"memory"); -+#endif - } - - /* -diff --git a/common/win.c b/common/win.c -index 3321a00..7454da0 100644 ---- a/common/win.c -+++ b/common/win.c -@@ -1979,17 +1979,17 @@ win_size2str(uint64_t size, char *buf, int bufsize) - * "buf" points to a big enough buffer. - */ - if ((i = (size / KB_BYTES)) < KB_BYTES) { -- (void) snprintf(buf, bufsize, "%luK", i); -+ (void) snprintf(buf, bufsize, "%"PRIu64"K", i); - } else if ((j = i / KB_BYTES) < KB_BYTES) { - if ((i % KB_BYTES) == 0) { -- (void) snprintf(buf, bufsize, "%luM", j); -+ (void) snprintf(buf, bufsize, "%"PRIu64"M", j); - } else { - (void) snprintf(buf, bufsize, "%.1fM", - (double)i / (double)KB_BYTES); - } - } else { - if ((j % KB_BYTES) == 0) { -- (void) snprintf(buf, bufsize, "%luG", j / KB_BYTES); -+ (void) snprintf(buf, bufsize, "%"PRIu64"G", j / KB_BYTES); - } else { - (void) snprintf(buf, bufsize, "%.1fG", - (double)j / (double)KB_BYTES); -@@ -2021,16 +2021,16 @@ win_lat_str_build(char *buf, int size, int idx, void *pv) - win_size2str(line->bufaddr.size, size_str, sizeof (size_str)); - - if (!line->nid_show) { -- (void) snprintf(buf, size, "%16lX%8s%10.1f%11lu%34s", -+ (void) snprintf(buf, size, "%16"PRIX64"%8s%10.1f%11"PRIu64"%34s", - line->bufaddr.addr, size_str, hit * 100.0, cyc2ns(lat), - line->desc); - } else { - if (line->nid < 0) { -- (void) snprintf(buf, size, "%16lX%8s%8s%10.1f%11lu", -+ (void) snprintf(buf, size, "%16"PRIX64"%8s%8s%10.1f%11"PRIu64, - line->bufaddr.addr, size_str, "-", hit * 100.0, - cyc2ns(lat)); - } else { -- (void) snprintf(buf, size, "%16lX%8s%8d%10.1f%11lu", -+ (void) snprintf(buf, size, "%16"PRIX64"%8s%8d%10.1f%11"PRIu64, - line->bufaddr.addr, size_str, line->nid, - hit * 100.0, cyc2ns(lat)); - } -@@ -2314,12 +2314,12 @@ win_lat_data_show(track_proc_t *proc, dyn_lat_t *dyn, boolean_t *note_out) - if (lwp == NULL) { - (void) snprintf(content, sizeof (content), - "Monitoring memory areas (pid: %d, " -- "AVG.LAT: %luns, interval: %s)", -+ "AVG.LAT: %"PRIu64"ns, interval: %s)", - proc->pid, cyc2ns(lat), intval_buf); - } else { - (void) snprintf(content, sizeof (content), - "Monitoring memory areas (lwpid: %d, " -- "AVG.LAT: %luns, interval: %s)", -+ "AVG.LAT: %"PRIu64"ns, interval: %s)", - lwp->id, cyc2ns(lat), intval_buf); - } - -@@ -2462,7 +2462,7 @@ accdst_str_build(char *buf, int size, int idx, void *pv) - accdst_line_t *lines = (accdst_line_t *)pv; - accdst_line_t *line = &lines[idx]; - -- (void) snprintf(buf, size, "%5d%14.1f%15lu", -+ (void) snprintf(buf, size, "%5d%14.1f%15"PRIu64, - line->nid, line->access_ratio * 100.0, cyc2ns(line->latency)); - } - diff --git a/numatop.spec b/numatop.spec index 88a19ed..281b5e4 100644 --- a/numatop.spec +++ b/numatop.spec @@ -1,18 +1,16 @@ %global _hardened_build 1 Name: numatop -Version: 1.0.1 -Release: 5%{?dist} +Version: 1.0.2 +Release: 1%{?dist} Summary: Memory access locality characterization and analysis License: BSD URL: https://01.org/numatop -Source0: https://01.org/sites/default/files/downloads/%{name}_linux_%{version}.tar.gz +Source0: https://01.org/sites/default/files/%{name}_linux_%{version}.tar.gz BuildRequires: numactl-devel ncurses-devel -# https://github.com/01org/numatop/pull/5 -Patch0: numatop.cpuid.patch - +# no NUMA ExcludeArch: %{arm} s390 s390x @@ -27,7 +25,6 @@ NumaTOP supports the Intel Xeon processors. %prep %setup -q -n %{name} -%patch0 -p 1 %build @@ -47,6 +44,10 @@ make install PREFIXDIR=%{buildroot}%{_prefix} MANDIR=%{buildroot}%{_mandir}/man8 %changelog +* Sun Mar 16 2014 Dridi Boukelmoune - 1.0.2-1 +- Bump version to 1.0.2 +- Remove upstreamed patch + * Fri Sep 20 2013 Dan HorĂ¡k - 1.0.1-5 - no numa on s390(x) diff --git a/sources b/sources index c5b8afe..250589a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -325389acd2d4ba40cfbc6ad3b839de7a numatop_linux_1.0.1.tar.gz +bcc4848d2c8a6351e7cb15a4194f6a86 numatop_linux_1.0.2.tar.gz