Re: Bug#665999: FTBFS on kfreebsd-*: procproperties.cpp:27:23: fatal error: asm/param.h: No such file or directory

2012-03-28 Thread Michael Biebl
On 28.03.2012 20:18, Robert Millan wrote:
> El 27 de març de 2012 19:39, Michael Biebl  ha escrit:
>> procproperties.cpp:27:23: fatal error: asm/param.h: No such file or directory
> 
> This program was building before.  Why was  dependency
> added?  Does it now rely on Linux-specific functionality, or is it
> optional?

http://git.gnome.org/browse/gnome-system-monitor/commit/?id=72546b7f3346fc0647a433529f3292050f15278f

> If this package is now Linux-specific, we have no choice.  However, if
> it's just an oversight, it's probably trivial to fix it.
> 
> Have a look at the rest of the file.  Which code in it depends on that
> header?  Does something break if you remove it?  Is this code
> conditionalized (e.g. #ifdef __linux__)?

I don't run kfreebsd.

What would be great is a (build-)tested patch I can apply.


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Re: Bug#665999: FTBFS on kfreebsd-*: procproperties.cpp:27:23: fatal error: asm/param.h: No such file or directory

2012-03-28 Thread Robert Millan
El 28 de març de 2012 22:42, Michael Biebl  ha escrit:
> I don't run kfreebsd.

You don't need to run anything.  When you're inclined, it'd be great
if you can take a minute to look at the source and answer my
questions.  I will really appreciate it.

Thanks!

-- 
Robert Millan


--
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caofdtxoqnadt0pu-_mcx+dmazzgqrpztzmpqiq-tksesbov...@mail.gmail.com



Bug#662658: x86info / kfreebsd

2012-03-28 Thread Christoph Egger
Hi!

While you're at updating x86info for kfreebsd please also consider
adding devd as a alternative to udev | makedev.

Regards

Christoph

-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer



-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87k4242zf5@hepworth.siccegge.de



Re: Bug#665999: FTBFS on kfreebsd-*: procproperties.cpp:27:23: fatal error: asm/param.h: No such file or directory

2012-03-28 Thread Steven Chamberlain
On 28/03/12 22:19, Robert Millan wrote:
> if you can take a minute to look at the source and answer my
> questions.  I will really appreciate it.

Hi,

I noticed there's an #ifdef linux in the file that introduced the
 include.  So if there is anything Linux-specific in that
file it probably wasn't intended:

> +#ifdef __linux__
> + memwritable += maps[i].private_dirty;
> +#else
> + if (maps[i].perm & GLIBTOP_MAP_PERM_WRITE)
> + memwritable += maps[i].size;
> +#endif

I would try a test build of this myself (and lots of other stuff) on
kFreeBSD and Linux when my new toy arrives...

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f7381fb.80...@pyro.eu.org



Bug#665999: #define HZ, libgtop and time accounting

2012-03-28 Thread Christoph Egger
tag 665999 + patch
quit

Michael Biebl  writes:
> Source: gnome-system-monitor

> procproperties.cpp:27:23: fatal error: asm/param.h: No such file or directory

Needed for the HZ macro.

Reading why this would be needed, diving into libgtop. This is basically
for reading the rtime field of glibtop_proc_time which is filled on
linux by reading from /proc/stat 

/* clock_t  (1/100 s) */
buf->utime  = strtoull (p, &p, 0);
buf->stime  = strtoull (p, &p, 0);
buf->rtime = buf->utime + buf->stime;

So seemingly non-normalized values

but on freebsd  with

pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
if ((pinfo == NULL) || (count != 1)) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
glibtop_suid_leave (server);
return;
}

glibtop_suid_leave (server);

buf->rtime = pinfo [0].ki_runtime * 1e-6;

len = sizeof (ci);
if (sysctlbyname ("kern.clockrate", &ci, &len, NULL, 0)) {
glibtop_warn_io_r (server, "sysctl (kern.clockrate) (%d)", pid);
glibtop_suid_leave (server);
return;
}

buf->frequency = (ci.stathz ? ci.stathz : ci.hz);
buf->flags = _glibtop_sysdeps_proc_time;

buf->rtime *= buf->frequency;

where kvm_getprocs is, according to [0], returning the value in
microsecs which is then normalized away with * 1e-6 and then again
multiplied by sysctl kernel.clockrate field stathz

kern.clockrate: { hz = 1000, tick = 1000, profhz = 8128, stathz = 127 }

so 127.

Please everyone recheck my math here, it's nearly 1 am in the morning
here ;-)

[0] http://bintree.net/freebsd/d8/ddb/user_8h_source.html#l00139

--- gnome-system-monitor-3.4.0.orig/src/procproperties.cpp
+++ gnome-system-monitor-3.4.0/src/procproperties.cpp
@@ -24,7 +24,14 @@
 #include 
 #include 
 #include 
+#ifdef __linux__
 #include 
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include 
+#include 
+#include 
+#include 
+#endif

 #include "procman.h"
 #include "procproperties.h"
@@ -106,6 +113,21 @@ fill_proc_properties (GtkWidget *tree, P
 {
 guint i;
 GtkListStore *store;
+guint hz;
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+struct clockinfo ci;
+size_t len;
+
+len = sizeof (ci);
+if (sysctlbyname ("kern.clockrate", &ci, &len, NULL, 0)) {
+assert(false);
+}
+
+hz = (ci.stathz ? ci.stathz : ci.hz);
+#elif defined (__linux__)
+hz = HZ;
+#endif

 get_process_memory_info(info);

@@ -120,7 +142,7 @@ fill_proc_properties (GtkWidget *tree, P
 { N_("Shared Memory"), format_memsize(info->memshared)},
 { N_("X Server Memory"), format_memsize(info->memxserver)},
 { N_("CPU"), g_strdup_printf("%d%%", info->pcpu)},
-{ N_("CPU Time"), g_strdup_printf(ngettext("%lld second", "%lld 
seconds", info->cpu_time/HZ), (unsigned long long)info->cpu_time/HZ) },
+{ N_("CPU Time"), g_strdup_printf(ngettext("%lld second", "%lld 
seconds", info->cpu_time/hz), (unsigned long long)info->cpu_time/hz) },
 { N_("Started"), g_strdup_printf("%s", ctime((const 
time_t*)(&info->start_time)))},
 { N_("Nice"), g_strdup_printf("%d", info->nice)},
 { N_("Priority"), g_strdup_printf("%s", 
procman::get_nice_level(info->nice)) },

-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer



-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87d37w2w7l@hepworth.siccegge.de