[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108459: * sysdep.c (system_process_a
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108459: * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]: |
Date: |
Sat, 02 Jun 2012 09:37:54 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108459
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sat 2012-06-02 09:37:54 -0700
message:
* sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
Convert pctcpu and pctmem to Lisp float properly.
Let the compiler fold better, as 100.0/0x8000 is exact.
modified:
src/ChangeLog
src/sysdep.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-06-02 08:52:27 +0000
+++ b/src/ChangeLog 2012-06-02 16:37:54 +0000
@@ -1,3 +1,9 @@
+2012-06-02 Paul Eggert <address@hidden>
+
+ * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
+ Convert pctcpu and pctmem to Lisp float properly.
+ Let the compiler fold better, as 100.0/0x8000 is exact.
+
2012-06-02 Andreas Schwab <address@hidden>
* alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
=== modified file 'src/sysdep.c'
--- a/src/sysdep.c 2012-05-25 18:19:24 +0000
+++ b/src/sysdep.c 2012-06-02 16:37:54 +0000
@@ -3107,8 +3107,8 @@
attrs = Fcons (Fcons (Qrss, make_fixnum_or_float (pinfo.pr_rssize)),
attrs);
/* pr_pctcpu and pr_pctmem are encoded as a fixed point 16 bit number
in [0 ... 1]. */
- attrs = Fcons (Fcons (Qpcpu, (pinfo.pr_pctcpu * 100.0) /
(double)0x8000), attrs);
- attrs = Fcons (Fcons (Qpmem, (pinfo.pr_pctmem * 100.0) /
(double)0x8000), attrs);
+ attrs = Fcons (Fcons (Qpcpu, make_float (100.0 / 0x8000 *
pinfo.pr_pctcpu)), attrs);
+ attrs = Fcons (Fcons (Qpmem, make_float (100.0 / 0x8000 *
pinfo.pr_pctmem)), attrs);
decoded_cmd
= code_convert_string_norecord (make_unibyte_string
(pinfo.pr_fname,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108459: * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:,
Paul Eggert <=