Hello community, here is the log from the commit of package eventstat for openSUSE:Factory checked in at 2018-02-09 15:53:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/eventstat (Old) and /work/SRC/openSUSE:Factory/.eventstat.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "eventstat" Fri Feb 9 15:53:27 2018 rev:5 rq:574630 version:0.04.03 Changes: -------- --- /work/SRC/openSUSE:Factory/eventstat/eventstat.changes 2017-10-30 21:19:00.798044294 +0100 +++ /work/SRC/openSUSE:Factory/.eventstat.new/eventstat.changes 2018-02-09 15:53:32.246480297 +0100 @@ -1,0 +2,10 @@ +Thu Feb 1 12:58:11 UTC 2018 - [email protected] + +- Update to version 4.04.03 + * Makefile: bump version + * re-format some overly wide source lines + * Don't force wide display unless long mode is used + * eventstat: add some more UNLIKELY/LIKELY annotations + * Update copyright dates + +------------------------------------------------------------------- Old: ---- eventstat-0.04.02.tar.gz New: ---- eventstat-0.04.03.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ eventstat.spec ++++++ --- /var/tmp/diff_new_pack.DnCb8O/_old 2018-02-09 15:53:33.134448402 +0100 +++ /var/tmp/diff_new_pack.DnCb8O/_new 2018-02-09 15:53:33.134448402 +0100 @@ -1,7 +1,7 @@ # # spec file for package eventstat # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: eventstat -Version: 0.04.02 +Version: 0.04.03 Release: 0 Summary: Kernel event states monitoring tool License: GPL-2.0+ ++++++ eventstat-0.04.02.tar.gz -> eventstat-0.04.03.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventstat-0.04.02/Makefile new/eventstat-0.04.03/Makefile --- old/eventstat-0.04.02/Makefile 2017-10-18 23:15:10.000000000 +0200 +++ new/eventstat-0.04.03/Makefile 2018-02-01 11:09:48.000000000 +0100 @@ -1,5 +1,5 @@ # -# Copyright (C) 2011-2017 Canonical, Ltd. +# Copyright (C) 2011-2018 Canonical, Ltd. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.04.02 +VERSION=0.04.03 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventstat-0.04.02/eventstat.8 new/eventstat-0.04.03/eventstat.8 --- old/eventstat-0.04.02/eventstat.8 2017-10-18 23:15:10.000000000 +0200 +++ new/eventstat-0.04.03/eventstat.8 2018-02-01 11:09:48.000000000 +0100 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH EVENTSTAT 8 "August 14, 2018" +.TH EVENTSTAT 8 "August 14, 2017" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/eventstat-0.04.02/eventstat.c new/eventstat-0.04.03/eventstat.c --- old/eventstat-0.04.02/eventstat.c 2017-10-18 23:15:10.000000000 +0200 +++ new/eventstat-0.04.03/eventstat.c 2018-02-01 11:09:48.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2017 Canonical + * Copyright (C) 2011-2018 Canonical * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -261,7 +261,7 @@ const int min_digits = 5; char buf[32]; - if (max_digits) + if (LIKELY(max_digits)) goto ret; max_digits = default_digits; @@ -621,7 +621,7 @@ timer_info_t *const *info1 = (timer_info_t *const *)item1; timer_info_t *const *info2 = (timer_info_t *const *)item2; - if ((*info2)->total_events == (*info1)->total_events) + if (UNLIKELY((*info2)->total_events == (*info1)->total_events)) return 0; return ((*info2)->total_events > (*info1)->total_events) ? 1 : -1; @@ -679,7 +679,7 @@ const pid_t pgid = id == 0 ? 0 : getpgid(id); /* We are either in a container, or with a task with a NULL cmdline */ - if (g_sane_procs || (id >= 0)) + if (LIKELY(g_sane_procs || (id >= 0))) return (pgid == 0); /* Can't get pgid on that pid, so make a guess */ @@ -798,7 +798,8 @@ (void)fprintf(fp, ",Total:"); for (i = 0; i < n; i++) - (void)fprintf(fp, ",%" PRIu64, sorted_timer_infos[i]->total_events); + (void)fprintf(fp, ",%" PRIu64, + sorted_timer_infos[i]->total_events); (void)fprintf(fp, "\n"); for (sdl = g_sample_delta_list_head; sdl; sdl = sdl->next) { @@ -812,7 +813,8 @@ if (first_time < 0) first_time = sdl->whence; - (void)fprintf(fp, ",%f", duration_round(sdl->whence - first_time)); + (void)fprintf(fp, ",%f", + duration_round(sdl->whence - first_time)); /* * Scan in timer info order to be consistent for all sdl rows @@ -952,7 +954,7 @@ info->time_total = new_info->time_total; info->timer = new_info->timer; info->ref_count = 0; - info->prev_used = time_now - duration; /* Fake previous time */ + info->prev_used = time_now - duration; /* Fake previous time */ info->last_used = time_now; info->total_events = 1; info->delta_events = 1; @@ -1068,7 +1070,8 @@ size_t i; count = 0; - timer_info_purge_old_from_timer_list(&g_timer_info_list, time_now); + timer_info_purge_old_from_timer_list(&g_timer_info_list, + time_now); for (i = 0; i < TABLE_SIZE; i++) timer_info_purge_old_from_hash_list(&g_timer_info_hash[i], time_now); } @@ -1203,7 +1206,7 @@ timer_stat_t *new) /* timer stat to add */ { while (*sorted) { - if (g_opt_flags & OPT_CUMULATIVE) { + if (UNLIKELY(g_opt_flags & OPT_CUMULATIVE)) { if ((*sorted)->info->total_events < new->info->total_events) { new->sorted_freq_next = *(sorted); break; @@ -1264,11 +1267,11 @@ uint64_t total = 0UL, kt_total = 0UL; int32_t j = 0; const int pid_size = pid_max_digits(); - int sz, ta_size, fn_size = 0; + int cols, sz, ta_size, fn_size = 0; int min_width; eventstat_winsize(); - if (g_resized && g_curses_init) { + if (UNLIKELY(g_resized && g_curses_init)) { resizeterm(g_rows, g_cols); refresh(); g_resized = false; @@ -1283,8 +1286,12 @@ min_width += TIMER_ID_WIDTH + 1; fn_size = FUNC_WIDTH; } + if (!(g_opt_flags & OPT_CMD_LONG) && g_cols > 80) + cols = 80; + else + cols = g_cols; - sz = g_cols - min_width; + sz = cols - min_width; sz = (sz < 0) ? 0 : sz; if (fn_size) { @@ -1293,9 +1300,10 @@ fn_size = FUNC_WIDTH_MAX; min_width += fn_size; - sz = g_cols - min_width; + sz = cols - min_width; sz = (sz < 0) ? 0 : sz; } + ta_size = sz; if (ta_size < TASK_WIDTH) ta_size = TASK_WIDTH; @@ -1416,7 +1424,7 @@ struct timeval tv; fd_set rfds; - if (duration < 0.0) + if (UNLIKELY(duration < 0.0)) break; tv = double_to_timeval(duration); @@ -1425,14 +1433,14 @@ errno = 0; rc = select(fd + 1, &rfds, NULL, NULL, &tv); - if (rc <= 0) + if (UNLIKELY(rc <= 0)) break; if (!FD_ISSET(fd, &rfds)) continue; ret = read(fd, buffer, sizeof(buffer)); if (ret == 0) continue; - if (ret < 0) { + if (UNLIKELY(ret < 0)) { if (!g_stop_eventstat && ((errno == EINTR) || (errno != EAGAIN))) { @@ -1536,7 +1544,7 @@ info.kernel_thread = pid_a_kernel_thread(task, info.pid); /* Swapper is special, like all corner cases */ - if (strncmp(task, "swapper", 6) == 0) + if (UNLIKELY(strncmp(task, "swapper", 6) == 0)) info.kernel_thread = true; mask = info.kernel_thread ? OPT_KERNEL : OPT_USER; @@ -1765,7 +1773,8 @@ /* Play catch-up, probably been asleep */ if (secs < 0.0) { t = ceil((time_now - time_start) / duration_secs); - secs = time_start + ((double)t * duration_secs) - time_now; + secs = time_start + + ((double)t * duration_secs) - time_now; /* Really, it's impossible, but just in case.. */ if (secs < 0.0) secs = 0.0; @@ -1813,7 +1822,8 @@ time_delta = time_now - time_start; eventstat_clear(); - timer_stat_dump(duration, time_delta, n_lines, time_now, timer_stats); + timer_stat_dump(duration, time_delta, n_lines, + time_now, timer_stats); eventstat_refresh(); timer_stat_free_contents(timer_stats); timer_info_purge_old(time_now);
