<feed xmlns='http://www.w3.org/2005/Atom'>
<title>system_core/libmeminfo, branch replicant-10</title>
<subtitle>Fork of system/core
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/'/>
<entry>
<title>Merge "VtsKernelMemInfoTest: only enforce on Q+ launching devices" into qt-dev</title>
<updated>2019-07-30T01:48:20+00:00</updated>
<author>
<name>Tri Vo</name>
<email>trong@google.com</email>
</author>
<published>2019-07-30T01:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=92fa5730de3b3ef185721c03f5037db9a3d84366'/>
<id>92fa5730de3b3ef185721c03f5037db9a3d84366</id>
<content type='text'>
am: 184e9461c5

Change-Id: I9fc6de0a4f5608ae718e52b0806727bc44fbb688
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
am: 184e9461c5

Change-Id: I9fc6de0a4f5608ae718e52b0806727bc44fbb688
</pre>
</div>
</content>
</entry>
<entry>
<title>VtsKernelMemInfoTest: only enforce on Q+ launching devices</title>
<updated>2019-07-25T22:06:48+00:00</updated>
<author>
<name>Tri Vo</name>
<email>trong@google.com</email>
</author>
<published>2019-07-24T00:06:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=48515dcfcbd5d4c0359c3f054de25dbff32cdfb8'/>
<id>48515dcfcbd5d4c0359c3f054de25dbff32cdfb8</id>
<content type='text'>
Bug: 135553509
Test: VtsKernelMemInfoTest
Change-Id: I299d24623c363238e46229f8d09865e3afd6f9c0
Merged-In: I299d24623c363238e46229f8d09865e3afd6f9c0
(cherry picked from commit ad986341a44de776f3b0f1e140eb359754c45284)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: 135553509
Test: VtsKernelMemInfoTest
Change-Id: I299d24623c363238e46229f8d09865e3afd6f9c0
Merged-In: I299d24623c363238e46229f8d09865e3afd6f9c0
(cherry picked from commit ad986341a44de776f3b0f1e140eb359754c45284)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix error printing code.</title>
<updated>2019-07-11T19:52:09+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2019-06-28T18:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=7d40ac80d5908aa0b9298eb2fb7efea2ef0d2643'/>
<id>7d40ac80d5908aa0b9298eb2fb7efea2ef0d2643</id>
<content type='text'>
Bug: 135694447

Test: Induced error and verified the errors print properly in logcat.
Change-Id: Ie0e6e71671a8a3e26b4632f93bb2af089a20e2e0
Merged-in: Ie0e6e71671a8a3e26b4632f93bb2af089a20e2e0
(cherry picked from commit d943301990367e81bd8752327f27827c9f2abba1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: 135694447

Test: Induced error and verified the errors print properly in logcat.
Change-Id: Ie0e6e71671a8a3e26b4632f93bb2af089a20e2e0
Merged-in: Ie0e6e71671a8a3e26b4632f93bb2af089a20e2e0
(cherry picked from commit d943301990367e81bd8752327f27827c9f2abba1)
</pre>
</div>
</content>
</entry>
<entry>
<title>Cache only a small portion of page map data.</title>
<updated>2019-07-11T19:51:35+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2019-06-26T00:30:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=89207939d890496b7c058be44d1c34ce6fd8ab42'/>
<id>89207939d890496b7c058be44d1c34ce6fd8ab42</id>
<content type='text'>
The scudo memory allocator will allocate a large virtual memory address
that causes procrank to allocate a huge amount of data. Modify so it
caches the data a bit at a time.

Remove some allocations that are not necessary since the data is only used
in the first loop.

Fix a few pread64 checks against the actual bytes read, rather than the
read is &lt; 0.

Fix sort by rss in procrank.

Bug: 135694447

Test: Ran unit tests (only one unit test actually runs the modified code).
Test: Ran the old version of procrank using a static libmeminfo and verified
Test: that the same data is found as the new version.

Change-Id: I8adc169b5607ec994ff13a9e161a479350d84c4d
Merged-In: I8adc169b5607ec994ff13a9e161a479350d84c4d
(cherry picked from commit 7f8915c76e232dd228930e749ec289d10c547f85)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The scudo memory allocator will allocate a large virtual memory address
that causes procrank to allocate a huge amount of data. Modify so it
caches the data a bit at a time.

Remove some allocations that are not necessary since the data is only used
in the first loop.

Fix a few pread64 checks against the actual bytes read, rather than the
read is &lt; 0.

Fix sort by rss in procrank.

Bug: 135694447

Test: Ran unit tests (only one unit test actually runs the modified code).
Test: Ran the old version of procrank using a static libmeminfo and verified
Test: that the same data is found as the new version.

Change-Id: I8adc169b5607ec994ff13a9e161a479350d84c4d
Merged-In: I8adc169b5607ec994ff13a9e161a479350d84c4d
(cherry picked from commit 7f8915c76e232dd228930e749ec289d10c547f85)
</pre>
</div>
</content>
</entry>
<entry>
<title>dmabuf_dump: Change the default view to per-process stats</title>
<updated>2019-07-02T01:17:15+00:00</updated>
<author>
<name>Sandeep Patil</name>
<email>sspatil@google.com</email>
</author>
<published>2019-06-27T07:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=41d77405d6e8bde886fab97e788759e37c30b49e'/>
<id>41d77405d6e8bde886fab97e788759e37c30b49e</id>
<content type='text'>
Add '-a' commandline option to show the old complete table that shows
dmabuf x process grid.

Fixes: 135668399
Test: dmabuf_dump
Test: dmabuf_dump -h
Test: dmabuf_dump -a
Test: dmabuf_dump -a 123
Test: dmabuf_dump 123 456
Test: dmabuf_dump &lt;pid&gt;

Change-Id: If228c97baa375c515d94baf3b5be674cfcc09919
Merged-In: If228c97baa375c515d94baf3b5be674cfcc09919
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add '-a' commandline option to show the old complete table that shows
dmabuf x process grid.

Fixes: 135668399
Test: dmabuf_dump
Test: dmabuf_dump -h
Test: dmabuf_dump -a
Test: dmabuf_dump -a 123
Test: dmabuf_dump 123 456
Test: dmabuf_dump &lt;pid&gt;

Change-Id: If228c97baa375c515d94baf3b5be674cfcc09919
Merged-In: If228c97baa375c515d94baf3b5be674cfcc09919
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmabuf_dump: Fix aosp_x86-eng builds</title>
<updated>2019-07-02T01:16:52+00:00</updated>
<author>
<name>Sandeep Patil</name>
<email>sspatil@google.com</email>
</author>
<published>2019-06-27T08:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=85aa081c83963affee7a2aa6959a62d9d3189388'/>
<id>85aa081c83963affee7a2aa6959a62d9d3189388</id>
<content type='text'>
Test: lunch aosp_x86-eng; mma -j
Test: lunch aosp_blueline-eng; mma -j
Bug: 136136199

Change-Id: Ie6f90c967b356a55db09acee7b3596661e001166
Merged-In: Ie6f90c967b356a55db09acee7b3596661e001166
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: lunch aosp_x86-eng; mma -j
Test: lunch aosp_blueline-eng; mma -j
Bug: 136136199

Change-Id: Ie6f90c967b356a55db09acee7b3596661e001166
Merged-In: Ie6f90c967b356a55db09acee7b3596661e001166
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dmabuf_dump: Make output more readable and debug friendly</title>
<updated>2019-07-02T01:16:23+00:00</updated>
<author>
<name>Sandeep Patil</name>
<email>sspatil@google.com</email>
</author>
<published>2019-06-26T03:17:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=852f553ca2350cb8aadea0f0cf92ad2707c77131'/>
<id>852f553ca2350cb8aadea0f0cf92ad2707c77131</id>
<content type='text'>
- Get rid of the PSS number that didn't make sense.
- Fix double counting in per-process size when buffers had file
  descriptors and mmap'ed
- Make the output much more readable
- Print totals where they make sense.
- Dont print per-process fd and map refs separately, total ref count per
  process is sufficient.

Bug: 135668399
Test: dmabuf_dump (on AOSP blueline)

Change-Id: I10dc0a332d49110dd68f0eaa94a326679361deea
Merged-In: I10dc0a332d49110dd68f0eaa94a326679361deea
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Get rid of the PSS number that didn't make sense.
- Fix double counting in per-process size when buffers had file
  descriptors and mmap'ed
- Make the output much more readable
- Print totals where they make sense.
- Dont print per-process fd and map refs separately, total ref count per
  process is sufficient.

Bug: 135668399
Test: dmabuf_dump (on AOSP blueline)

Change-Id: I10dc0a332d49110dd68f0eaa94a326679361deea
Merged-In: I10dc0a332d49110dd68f0eaa94a326679361deea
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>procrank: do not keep process maps around</title>
<updated>2019-04-26T20:57:17+00:00</updated>
<author>
<name>Sandeep Patil</name>
<email>sspatil@google.com</email>
</author>
<published>2019-04-17T18:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=151a06c25a72f2e62848e24a582c915acc54f878'/>
<id>151a06c25a72f2e62848e24a582c915acc54f878</id>
<content type='text'>
procrank's usage in its output shows 20x increase from
last year. This is because it is keeping the process
maps around until termination. Fix that by getting rid
of ProcMemInfo objects when done parsing /proc/&lt;pid&gt;/maps,pagemap.

Note that the total allocations do not change and have not necessarily
regressed from Pie.

Bug: 130672819
Test: adb shell procrank | grep 'procrank\|cmdline'

Change-Id: Ib7bf960ed1d053347fcfc0c8aee9019607a1eb01
Merged-In: Ib7bf960ed1d053347fcfc0c8aee9019607a1eb01
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
procrank's usage in its output shows 20x increase from
last year. This is because it is keeping the process
maps around until termination. Fix that by getting rid
of ProcMemInfo objects when done parsing /proc/&lt;pid&gt;/maps,pagemap.

Note that the total allocations do not change and have not necessarily
regressed from Pie.

Bug: 130672819
Test: adb shell procrank | grep 'procrank\|cmdline'

Change-Id: Ib7bf960ed1d053347fcfc0c8aee9019607a1eb01
Merged-In: Ib7bf960ed1d053347fcfc0c8aee9019607a1eb01
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libmeminfo/procrank: Ignore failures when process disappears.</title>
<updated>2019-04-10T15:01:06+00:00</updated>
<author>
<name>Sandeep Patil</name>
<email>sspatil@google.com</email>
</author>
<published>2019-04-09T19:31:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=c4c05e3b25c4e2935f5214850b8ff3103f94dc25'/>
<id>c4c05e3b25c4e2935f5214850b8ff3103f94dc25</id>
<content type='text'>
procrank currently fails if a process gets killed while it is reading
the stats. This behavior is a regression from the previous version of
procrank and is often undesired.

Change procrank to silently ignore the process if it detects that it had
been killed while reading the stats. If the process is still around,
then print a warning about it and continue to read stats for other
processes in the system.

Fixes: 130177765
Test: Tested by deliberately killing specific process in ProcessRecord()
      constructor

Change-Id: I701808c3226bb9b3a350ccf8e67fb29b59b0d4e0
Merged-In: I701808c3226bb9b3a350ccf8e67fb29b59b0d4e0
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
procrank currently fails if a process gets killed while it is reading
the stats. This behavior is a regression from the previous version of
procrank and is often undesired.

Change procrank to silently ignore the process if it detects that it had
been killed while reading the stats. If the process is still around,
then print a warning about it and continue to read stats for other
processes in the system.

Fixes: 130177765
Test: Tested by deliberately killing specific process in ProcessRecord()
      constructor

Change-Id: I701808c3226bb9b3a350ccf8e67fb29b59b0d4e0
Merged-In: I701808c3226bb9b3a350ccf8e67fb29b59b0d4e0
Signed-off-by: Sandeep Patil &lt;sspatil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libmeminfo: librank optimization using maps instead of vectors</title>
<updated>2019-03-02T00:17:20+00:00</updated>
<author>
<name>Erick Reyes</name>
<email>erickreyes@google.com</email>
</author>
<published>2019-03-01T02:22:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=5a744684c3feab43f47721916d339b9111b1fd88'/>
<id>5a744684c3feab43f47721916d339b9111b1fd88</id>
<content type='text'>
librank was calling std::vector::find_if in nested loops when iterating
through processes and maps.

Changed the implementation to use std::map::insert, this resulted in
a significant improvement to execution speed.

Test: time librank on crosshatch

Before:  1m22.57s real     1m15.87s user     0m05.79s system
After:   0m03.85s real     0m00.88s user     0m02.92s system

Bug: 124523194

Change-Id: I2b519d0bfd7f7929c6c4c6c2374794cb1a744585
Signed-off-by: Erick Reyes &lt;erickreyes@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
librank was calling std::vector::find_if in nested loops when iterating
through processes and maps.

Changed the implementation to use std::map::insert, this resulted in
a significant improvement to execution speed.

Test: time librank on crosshatch

Before:  1m22.57s real     1m15.87s user     0m05.79s system
After:   0m03.85s real     0m00.88s user     0m02.92s system

Bug: 124523194

Change-Id: I2b519d0bfd7f7929c6c4c6c2374794cb1a744585
Signed-off-by: Erick Reyes &lt;erickreyes@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
