Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* more time-1.6 fixes
@ 1996-08-04 18:39 David Mosberger-Tang
  1996-08-06  9:53 ` Stephen C. Tweedie
  0 siblings, 1 reply; 3+ messages in thread
From: David Mosberger-Tang @ 1996-08-04 18:39 UTC (permalink / raw)


The time command as distributed with Red Hat 3.0.3 does not count page
faults properly (they're always zero).  Turns out this is due to a bug
in configure (the same problem exists on the x86).  The easiest way to
fix this:

	- run "autoconf" in time-1.6 directory (must have a recent
	  version of autoconf; 2.10 is known to be good)

	- create "install-sh" file (an empty file is OK as long as
	  you don't run "make install"

	- run ./configure

	- build with "make CFLAGS=-O2"

	- install new "time" binary

This works fine at least when using GNU libc---I haven't tried the old
libc.

Note that there will still be a few stats that are always zero
(avgtext, avgdata, maxresident, inputs, outputs), but that's because
the Linux kernel doesn't keep track of those values.

	--david

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: more time-1.6 fixes
  1996-08-04 18:39 more time-1.6 fixes David Mosberger-Tang
@ 1996-08-06  9:53 ` Stephen C. Tweedie
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen C. Tweedie @ 1996-08-06  9:53 UTC (permalink / raw)


Hi,

On Sun, 4 Aug 1996 11:39:55 -0700, David Mosberger-Tang <davidm@AZStarNet.com> said:

> The time command as distributed with Red Hat 3.0.3 does not count page
> faults properly (they're always zero).  Turns out this is due to a bug
> in configure (the same problem exists on the x86).

I posted a working set of time [s]rpms over a month ago which fixed
this; I hope the announcement email didn't get lost.  I put them up
for ftp on linux.dcs.ed.ac.uk:/pub/linux, but we had a disk crash over
the weekend so it might be a couple of days before they are back.  I
_think_ I put binary rpms onto redhat incoming.

Anyway, the only fix needed is to explicitly tell the make process
that the kernel supports WAIT3.  The old autoconf was not detecting
this for the very good reason that the kernel fails to count context
switches in the process info structure.  Compiling with -DHAVE_WAIT3
is sufficient both to correct the HZ problem and to get page fault
accounting working.

The following spec file was the one I used, and it produces a correct
time(1) binary using the normal gnu time-1.6.tar.gz source.

Cheers,
 Stephen.

--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.
----------------------------------------------------------------
Description: GNU time Utilities
Name: time
Version: 1.6
Release: 5
Copyright: GPL
Group: Utilities/System
Source: prep.ai.mit.edu:/pub/gnu/time-1.6.tar.gz

%prep
%setup

%build
./configure --prefix=/usr
make CFLAGS="$RPM_OPT_FLAGS -DHAVE_WAIT3" LDFLAGS=-s

%install
rm -f /usr/info/time.info*
make install
gzip -9nf /usr/info/time.info
strip /usr/bin/time

%files
%doc NEWS README
/usr/bin/time
/usr/info/time.info*

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: more time-1.6 fixes
@ 1996-08-06 14:27 David Mosberger-Tang
  0 siblings, 0 replies; 3+ messages in thread
From: David Mosberger-Tang @ 1996-08-06 14:27 UTC (permalink / raw)


>>>>> On Tue, 6 Aug 1996 10:53:21 +0100, "Stephen C. Tweedie" <sct@dcs.ed.ac.uk> said:

  Stephen> Hi, On Sun, 4 Aug 1996 11:39:55 -0700, David Mosberger-Tang
  Stephen> <davidm@AZStarNet.com> said:

  >> The time command as distributed with Red Hat 3.0.3 does not count
  >> page faults properly (they're always zero).  Turns out this is
  >> due to a bug in configure (the same problem exists on the x86).

  Stephen> I posted a working set of time [s]rpms over a month ago
  Stephen> which fixed this; I hope the announcement email didn't get
  Stephen> lost.  I put them up for ftp on
  Stephen> linux.dcs.ed.ac.uk:/pub/linux, but we had a disk crash over
  Stephen> the weekend so it might be a couple of days before they are
  Stephen> back.  I _think_ I put binary rpms onto redhat incoming.

No, I'm pretty sure your announcement made it.  I just didn't
realize/remember that you fixed the configuration bug too, so I never
bothered to download it.  Next time I'll check more carefully.

  Stephen> Anyway, the only fix needed is to explicitly tell the make
  Stephen> process that the kernel supports WAIT3.  The old autoconf
  Stephen> was not detecting this for the very good reason that the
  Stephen> kernel fails to count context switches in the process info
  Stephen> structure.  Compiling with -DHAVE_WAIT3 is sufficient both
  Stephen> to correct the HZ problem and to get page fault accounting
  Stephen> working.

The newer autconf checks a few other variables in the resource
structure, so it will correctly detect the presence of wait3().

	--david

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-08-06 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-04 18:39 more time-1.6 fixes David Mosberger-Tang
1996-08-06  9:53 ` Stephen C. Tweedie
  -- strict thread matches above, loose matches on Subject: below --
1996-08-06 14:27 David Mosberger-Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox