diff options
author | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-12-14 23:04:38 +0000 |
---|---|---|
committer | Lennart Kolmodin <kolmodin@gentoo.org> | 2009-12-14 23:04:38 +0000 |
commit | 6bf5650f77cd5e108c37026a751f264387ff7284 (patch) | |
tree | 6c107de6bd62a57545bbf80d1e6c731c34e8e59a /x11-misc/xmobar | |
parent | Fix Manifest (diff) | |
download | historical-6bf5650f77cd5e108c37026a751f264387ff7284.tar.gz historical-6bf5650f77cd5e108c37026a751f264387ff7284.tar.bz2 historical-6bf5650f77cd5e108c37026a751f264387ff7284.zip |
Add missing patch to x11-misc/xmobar.
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'x11-misc/xmobar')
-rw-r--r-- | x11-misc/xmobar/ChangeLog | 6 | ||||
-rw-r--r-- | x11-misc/xmobar/Manifest | 9 | ||||
-rw-r--r-- | x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch | 71 |
3 files changed, 81 insertions, 5 deletions
diff --git a/x11-misc/xmobar/ChangeLog b/x11-misc/xmobar/ChangeLog index 437ee7eaa65a..cb485c2f1c6a 100644 --- a/x11-misc/xmobar/ChangeLog +++ b/x11-misc/xmobar/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for x11-misc/xmobar # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-misc/xmobar/ChangeLog,v 1.4 2009/11/26 21:46:11 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-misc/xmobar/ChangeLog,v 1.5 2009/12/14 23:04:38 kolmodin Exp $ + + 14 Dec 2009; <kolmodin@gentoo.org> + +files/xmobar-0.9.2-cpu-high-load.patch: + Add missing patch. See bug #295176. *xmobar-0.9.2-r1 (26 Nov 2009) diff --git a/x11-misc/xmobar/Manifest b/x11-misc/xmobar/Manifest index 347f96ece58d..cf6ac1cec5c9 100644 --- a/x11-misc/xmobar/Manifest +++ b/x11-misc/xmobar/Manifest @@ -1,6 +1,7 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX xmobar-0.9.2-cpu-high-load.patch 2598 RMD160 7d6477540ac354e67995ee87d01bdc075f22fbff SHA1 4ea0781f303314f67974757f2cc70a1deeba935e SHA256 646af583ddb70ca7b2ce375a0742d68ae7d974355fddcf023a5d1d827cd9133d DIST xmobar-0.8.tar.gz 29869 RMD160 1eae11c3ff37d3d0d583b991b14f2622daab275d SHA1 895979aefda9d3b083bf6edd31e0b045bf7e7dca SHA256 88aa5bc0715e2592282e5897bc7938f16580804f56757bc71ed3762bf86c9415 DIST xmobar-0.9.2.tar.gz 29334 RMD160 ffe000a93b18e9f7638e09a06924b34640bafcca SHA1 af57c20d25b174715729dd9b973bf19213f007d7 SHA256 361295f5dc912512a2eb644ecd331562a271243192be6215cb071e44f50c7c66 DIST xmobar-0.9.tar.gz 37172 RMD160 9c4407a839f42fba9eca3dab58917ad12621111d SHA1 79aca34379e31b1e9974314cec5231163ecab1c9 SHA256 1e52e9ec669504ae66ae98fbd5291a7034e28723bf93abe29345d5567aefeba9 @@ -8,12 +9,12 @@ EBUILD xmobar-0.8-r1.ebuild 977 RMD160 7eda6113818ffaeb37c514d12d19aa7e0ca577d0 EBUILD xmobar-0.8.ebuild 861 RMD160 0e0d662139283a7e93c9a960a3ddc7f2f7fc8cef SHA1 ba5033768051bdcc7afcfc2ce26448d8126c6f33 SHA256 42013a02447d918e0f9153c107de383cf828fb4d313eafd50fd624c9e3a170c6 EBUILD xmobar-0.9.2-r1.ebuild 1512 RMD160 7e9d56e6555d4a0ac76e3fea0d54a22f0271c9f2 SHA1 c89e26cfc8e1307c1c7e721720e76b5e686931fc SHA256 dbc97a5a46c9b5a50c0142b2fc376958f31b5ecb2446faef6771303632164ff7 EBUILD xmobar-0.9.ebuild 835 RMD160 0314093ced1ce940dc29dadf0ccfe6ddc2360ae4 SHA1 85a2eb8b78f13b4a4a5f10cdc5bcdcbd37b5f588 SHA256 dee27ba6a0d8a72094dce053925f4932735332ffd622acdcd5c6acf099e264cf -MISC ChangeLog 811 RMD160 abe51461f5bc845d64b4877638e3e14b596c75b8 SHA1 f530a643120020ff195e8a5c46444370aa1a08cf SHA256 8697c25f309d8208b839f836e3e5af577c7f89ef1d83e062575a9f618f44ea85 +MISC ChangeLog 930 RMD160 5d6d1703b28c027ba5861366c69b6d871a2d609a SHA1 2fc2e08c3f087cd11e4d606f720f70db6616d041 SHA256 01197399acf54296bdb64813ec0a501c9ba669eb674b846ec307ff905a580940 MISC metadata.xml 326 RMD160 8a245bae2f03eafe73e40975ac0de3cb05a195cd SHA1 8a2589e3a4c621b55a0bf39f313a9ced394d4b44 SHA256 91d8af01976bf4fd4ae6a23e26d18acaa2a77b3bcdd426ea48d5a0b75fc34a9c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAksO9xUACgkQ1n/CYbXjntIQyACgmbASvoNRDwEchmGWNxcTdOJP -F2QAoICt+NTE03nvQZz2bPFWdGZIPBl6 -=ZO96 +iEYEARECAAYFAksmxH0ACgkQ1n/CYbXjntLrVwCgsLv5nikH9tLmZkNdBqZURkQy +Wp4AnijoyJ04Lkbbu9kDgAUAb+Ef+Ned +=X9pO -----END PGP SIGNATURE----- diff --git a/x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch b/x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch new file mode 100644 index 000000000000..b2bfcafcfde2 --- /dev/null +++ b/x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch @@ -0,0 +1,71 @@ +Sun Aug 16 22:25:20 EEST 2009 Sergei Trofimovich <slyfox@inbox.ru> + * fixed "Abnormally high cpu load on X" (11 issue in tracker) + + Steps to reproduce are described in + http://code.google.com/p/xmobar/issues/detail?id=11 + + I've noticed large bunch of XAllocNamedColor calls/sec + in xmobar ltrace log. + This patch introduces simple hackish color cachig. It's more PoC, + than real fix. +diff -rN -u old-xmobar/XUtil.hsc new-xmobar/XUtil.hsc +--- old-xmobar/XUtil.hsc 2009-08-16 22:26:45.107628493 +0300 ++++ new-xmobar/XUtil.hsc 2009-08-16 22:26:45.126628260 +0300 +@@ -33,12 +33,14 @@ + import Control.Concurrent + import Control.Monad + import Control.Monad.Trans ++import Data.IORef + import Foreign + import Graphics.X11.Xlib hiding (textExtents, textWidth) + import qualified Graphics.X11.Xlib as Xlib (textExtents, textWidth) + import Graphics.X11.Xlib.Extras + import System.Posix.Types (Fd(..)) + import System.IO ++import System.IO.Unsafe (unsafePerformIO) + #if defined XFT || defined UTF8 + import Foreign.C + import qualified System.IO.UTF8 as UTF8 (readFile,hGetLine) +@@ -187,9 +189,31 @@ + initColor dpy c = (initColor' dpy c) `catch` + (const . return $ DynPixel False (blackPixel dpy $ defaultScreen dpy)) + ++type ColorCache = [(String, Color)] ++ ++-- dark magic: enable hack ++{-# NOINLINE colorCache #-} ++colorCache :: IORef ColorCache ++colorCache = unsafePerformIO $ newIORef [] ++ ++getCachedColor :: String -> IO (Maybe Color) ++getCachedColor color_name = do ++ result <- lookup color_name `fmap` readIORef colorCache ++ return result ++ ++putCachedColor :: String -> Color -> IO () ++putCachedColor color_name color_id = do ++ modifyIORef colorCache $ \cache -> (color_name,color_id) : cache ++ + initColor' :: Display -> String -> IO DynPixel + initColor' dpy c = do +- (c', _) <- allocNamedColor dpy colormap c ++ cached_color <- getCachedColor c ++ c' <- do ++ case cached_color of ++ Just col -> return col ++ _ -> do (c'', _) <- allocNamedColor dpy colormap c ++ putCachedColor c c'' ++ return c'' + return $ DynPixel True (color_pixel c') + where colormap = defaultColormap dpy (defaultScreen dpy) + +@@ -197,7 +221,8 @@ + withColors d cs f = do + ps <- mapM (io . initColor d) cs + r <- f $ map pixel ps +- io $ freeColors d cmap (map pixel $ filter allocated ps) 0 ++ -- there is color leak in 'putCachedColor'. might be freed at xmobar shutdown ++ -- io $ freeColors d cmap (map pixel $ filter allocated ps) 0 + return r + where + cmap = defaultColormap d (defaultScreen d) |