[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#460331: still have this problem on kfreebsd-i386

On  linux, we just use ELF notes and this problem goes away.  If there
is something equivalent in freeBSD then I could use that as well.

I wouldn't know, I'm just the poor DSA who gets to fight these machines.  :)
Maybe the debian-bsd list would know.

The ELF notes are the property of ELF format which is used on both platforms. In general, the ELF notes are available on GNU/kFreeBSD.

The kernel supplies them. Each note is a pair of name and value.
The GNU/kFreeBSD kernel does not supply note with name AT_CLKTCK.

On GNU/kFreeBSD:

$ LD_SHOW_AUXV=1 /bin/true
AT_PHDR:         0x400040
AT_PHENT:        56
AT_PHNUM:        8
AT_PAGESZ:       4096
AT_FLAGS:        0x0
AT_ENTRY:        0x400d90
AT_BASE:         0x800604000
AT_PLATFORM:     /bin/true

And on Linux:

$ LD_SHOW_AUXV=1 /bin/true
AT_SYSINFO_EHDR: 0x7ffff636f000
AT_HWCAP:        bfebfbff
AT_PAGESZ:       4096
AT_CLKTCK:       100
AT_PHDR:         0x400040
AT_PHENT:        56
AT_PHNUM:        8
AT_BASE:         0x7ff5b45f6000
AT_FLAGS:        0x0
AT_ENTRY:        0x400d50
AT_UID:          1000
AT_EUID:         1000
AT_GID:          1000
AT_EGID:         1000
AT_SECURE:       0
AT_PLATFORM:     x86_64

In general it might correspond to one of the following values
  $ sysctl kern.clockrate
  kern.clockrate: { hz = 1000, tick = 1000, profhz = 2000, stathz = 133 }

In case of /proc file system under GNU/kFreeBSD it seems as constant 100. See definition of T2J in

[Is this in any way related to ps showing completely broken timestamps
in the START column?
It boils down to that the freebsd procfs is incomplete.

Hmm.  Thanks.

Yes, the linprocfs.c file have to be extended and verified against contemporary linux's /proc values.


Reply to: