After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 650692 - Add "Memory" tab to lg
Add "Memory" tab to lg
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-20 19:59 UTC by Colin Walters
Modified: 2011-06-07 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add "Memory" tab to lg (4.98 KB, patch)
2011-05-20 19:59 UTC, Colin Walters
none Details | Review
Add "Memory" tab to lg (5.59 KB, patch)
2011-05-20 21:05 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2011-05-20 19:59:46 UTC
shell_get_memory_info() is a new function which extracts a few
global counters we have already, namely glibc's mallinfo and
gjs' counters for object wrappers.

There is some slight overlap with perf; ultimately though I'd
like this function to do some more extensive analysis, so it wouldn't
be quite the same.

perf is going to be mainly concerned with how big the whole process
over time is; memory_info is for debugging memory leaks.
Comment 1 Colin Walters 2011-05-20 19:59:48 UTC
Created attachment 188241 [details] [review]
Add "Memory" tab to lg
Comment 2 Colin Walters 2011-05-20 21:05:30 UTC
Created attachment 188251 [details] [review]
Add "Memory" tab to lg

Move to ShellGlobal, get JSGC_BYTES
Comment 3 drago01 2011-06-05 08:47:38 UTC
Review of attachment 188251 [details] [review]:

Code looks good modulo white space issues:

/home/linux/gnome-shell/source/gnome-shell/.git/rebase-apply/patch:34: trailing whitespace.
        
/home/linux/gnome-shell/source/gnome-shell/.git/rebase-apply/patch:109: trailing whitespace.
  
/home/linux/gnome-shell/source/gnome-shell/.git/rebase-apply/patch:111: trailing whitespace.

The layout inside the tab could be better IMO (spacing + padding etc.); but the contents of lg is not subject to 
design so I leave this up to you whether you want to improve it or not.

::: js/ui/lookingGlass.js
@@ +601,3 @@
+        this.actor.add(this._gjs_function);
+        this._gjs_closure = new St.Label();
+        this.actor.add(this._gjs_closure);

I'd add a new line before the new St.Label() lines to make this a bit more readable.
Comment 4 Colin Walters 2011-06-07 18:49:06 UTC
Attachment 188251 [details] pushed as aa03734 - Add "Memory" tab to lg