• Home
  • History
  • Annotate
  • only in /system/extras/libpagemap/
History log of /system/extras/libpagemap/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
16db6720ae5d210a06d36758fcf4b5f2f1aeda73 03-Oct-2017 Chih-Hung Hsieh <chh@google.com> Use -Werror in system/extras

* Use system-extras-cflags-defaults
* Move -Wall -Werror from cppflags to cflags
* fix warning on redefinition of MAX_PATH

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ib14b4d8eece767225a6fef639ed190b343678c00
ndroid.bp
f888556814d2c3b33992c643269335a50027fec7 24-Jul-2017 Justin Yun <justinyun@google.com> Mark the module as VNDK or VNDK-SP in Android.bp

As a VNDK/VNDK-SP module, Android.bp must have 'vndk' tag as well
as 'vendor_available: true'.

For a VNDK module, the 'vndk' tag has 'enabled: true'.
It will be installed system/lib(64)/vndk as a vendor variant.

For a VNDK-SP module, the 'vndk' tag has
'support_system_process: true' as well as 'enabled: true'.
It will be installed system/lib(64)/vndk-sp as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I7a2eaf4894188d4d300fcc78380a2b05517c54f4
Change-Id: I7a2eaf4894188d4d300fcc78380a2b05517c54f4
(cherry picked from commit 953341705abd2a840b464928d9ce56e0c1f37b25)
ndroid.bp
37212881797146ff95b49d252ed0e576d14a7fdb 17-May-2017 Jayant Chowdhary <jchowdhary@google.com> Mark libpagemap vendor_available.

libpagemap is a library which belongs to vndk-cap. Mark it vendor_available to
enable vndk abi stability checks on it.

Details: https://android-review.googlesource.com/368372

Test: mm -j64

Bug: 38244611

Change-Id: I310d0a4d8dd9e87615c276bd66639170b2a70648
ndroid.bp
72271f8e5001bb157a878ca278443d526b6d346d 16-Sep-2016 Dimitry Ivanov <dimitry@google.com> libpagemap: add static library for pagemap

Bionic unit/cts tests need use static version of libpagemap
to avoid depending on internal android library.

Test: mm && run pagemap_static_test
Bug: http://b/22182538
Change-Id: Ic8b4e74565f77a71540e8cb2c7f9dc67f8d5e10c
ndroid.bp
9eed624c760b9c70de9a8f75ff84c5f085d62fdc 24-Aug-2016 Elliott Hughes <enh@google.com> Don't invent our own pagemap constants.

Use the uapi ones instead, so I don't have to think about whether ours
are correct.

Bug: http://b/31044648
Change-Id: Ibe4a078ad3223419301a5f585e8ed24dd7366ce2
nclude/pagemap/pagemap.h
m_map.c
008b9cc73407b93a983c47aff15ef5d62e092f5c 11-Aug-2016 Nick Desaulniers <ndesaulniers@google.com> procrank: fix bounds check to prevent heap overflow

Bug: 30774296
Change-Id: I44005caaa3cc17fe829f375a4cfeb5a464c97fbe
(cherry picked from commit 98a20cd1283b6ee029e871c0876815300475c40a)
m_memusage.c
e9d8251b4986003bfe5ef832861be03ebe572cf6 12-Jul-2016 Colin Cross <ccross@android.com> Convert libpagemap Android.mk to Android.bp

Change-Id: I551a7f7ce46267bb609e5ed8bd8dafc00b9fbab7
ndroid.bp
ndroid.mk
de7f00c1e4a85742cb9d701316dd59fa4c1a5a7f 18-May-2016 Chih-Hung Hsieh <chh@google.com> Fix misc-macro-parentheses warnings in libpagemap.

Bug: 28705665
Change-Id: I3a40229aeba12b3fb643770c92039a2af1e4a441
nclude/pagemap/pagemap.h
02235d5d8d8f20559803ac30ed367cb968cfa207 01-Mar-2016 Elliott Hughes <enh@google.com> Merge "Fix pagemap_test#maps."
am: 5dc5241d77

* commit '5dc5241d7785569a6a4b65df475ac9451cdfe531':
Fix pagemap_test#maps.
b2084a55a9e499b8c26b751956078282e12b0609 01-Mar-2016 Elliott Hughes <enh@google.com> Fix pagemap_test#maps.

We don't necessarily have a brk-based heap.

Bug: http://b/27425642
Change-Id: Iac30904ba35c645afe9b056de8df975ebce92a37
agemap_test.cpp
0ebf764baff1723e5217d083b2fa4457b8f23e5f 17-Feb-2016 Bill Yi <byi@google.com> Merge commit '4258431621ef3cd32d3cec9604fa17324299cc42' into HEAD
879785074ca93e13896ce364a45eb5cc17081c4a 03-Feb-2016 Dan Albert <danalbert@google.com> Fix warnings in system/extras.

Bug: http://b/26936282
Change-Id: I1b9c6c9bb06944c32abcb871279d056eea0fb11a
ndroid.mk
c641ee41319181e02e3a9afc2fc93d3989d1d41e 03-Dec-2015 Thierry Strudel <tstrudel@google.com> procrank: add proportional swap accounting am: 08ea6e722b
am: 6ca5d69923

* commit '6ca5d6992307ac6d063e4a7a1f0457afb88e033c':
procrank: add proportional swap accounting
08ea6e722b1f2d6359f54fe39c6bed82f524291c 21-Nov-2015 Thierry Strudel <tstrudel@google.com> procrank: add proportional swap accounting

Shared pages are reported in each of the sharing process swapped pages.
Compute a proportional swap usage to get a meaningful value of what each
process has in swap. Report also process unique pages swapped out.
In case ZRAM is used compute the compression ration and report the
actual RAM use of the swapped pages.

Bug: 25392275
Change-Id: I3a28c7812a09a02e1a604593615f5c6ad0340f9f
nclude/pagemap/pagemap.h
m_map.c
m_memusage.c
m_process.c
aa5a7df9d83c39e41fd07c1281a9912544022448 18-Jun-2015 Yu Liu <e7664c@motorola.com> Swap column in procrank not reported with swap enabled

Bug: 25392275
Change-Id: I6d2a0b03abba555b3667f6ccf12896caeecf27aa
m_map.c
72f4a2f30765fe17ba0dbf178c61fa953154108a 23-Sep-2015 Elliott Hughes <enh@google.com> Use %n to parse maps in libpagemap.

Bug: http://b/24212024
Change-Id: If00782c7af6fde30650045180512132ee5a8fd89
ndroid.mk
agemap_test.cpp
m_process.c
28872b21627c77b8fb2f295f1090619fc00b801f 18-Jun-2015 Yu Liu <e7664c@motorola.com> Swap column in procrank not reported with swap enabled
m_map.c
1cd49841dce6c79a82db1582f8fcaf23325ec0e2 22-Apr-2015 daegeun.song <daegeun.song@lge.com> Do free and fclose when error occur.

Do free and fclose when error occur.

Change-Id: Ifc611579cf919eeb3fbbf1dff70e7f851a26e083
Signed-off-by: Daegeun Song <daegeun.song@lge.com>
m_process.c
60f3c7cfc3781192ddc2e2c677e52d20ca7dd516 03-Sep-2014 Daniel Rosenberg <drosen@google.com> Revert "libpagemap: Mask off page shift to get page frame number"

This reverts commit 4bf06a51869f49d7ee3fb0163a2517ec5e33ba1f.

Bug: 17360804
Bug: 17332389
Change-Id: I7e4d55215f391f5b3f71388943e9d95e5eff6f81
m_process.c
4bf06a51869f49d7ee3fb0163a2517ec5e33ba1f 29-Aug-2014 Daniel Rosenberg <drosen@google.com> libpagemap: Mask off page shift to get page frame number

see comment above pagemap_read() from the kernel

Bug: 17332389
Change-Id: Iaec9a2c8d2783f5c1e7ba06d9c7156305abe0453
Signed-off-by: Daniel Rosenberg <drosen@google.com>
m_process.c
e2998ffe6f494f06b25aca372c1d35cd47390b98 17-Jun-2014 Colin Cross <ccross@android.com> libpagemap: support 64-bit kernel from 32-bit libpagemap

Use uint64_t and lseek64 to handle 64-bit virtual addresses
when libpagemap is compiled as a 32-bit library.

Change-Id: Ie4b6c7ef05aac604011f3ee28b059d9dfcd63edb
nclude/pagemap/pagemap.h
m_kernel.c
m_process.c
d6c0e17d4fc53db1d123134866d8ec610288221a 17-Jun-2014 Colin Cross <ccross@android.com> fix libpagemap for x86_64

libpagemap was storing a virtual pfn in an int, which works on arm64
with 39 bits of virtual address space but fails on x86_64. Use an
unsigned long instead.

Fixes errors when running procrank on x86_64:
warning: could not read usage for 1

Change-Id: I171c8ee49faa51accf3c1bb69059d549aee04979
m_process.c
cb8ac609ee27a9e5e6e13bc30447ed3a13964ccd 15-May-2014 Colin Cross <ccross@android.com> Merge "libpagemap: handle zero length memory regions"
bac600309b1aed0d55bee8c32c5031ba889ee517 15-May-2014 Colin Cross <ccross@android.com> libpagemap: handle zero length memory regions

/proc/pid/maps may report a zero-length memory region for a 4kB
PROT_GROWSDOWN region because it subtracts 4kB for the guard page.
Return 0 instead of -1 when this occurs, and set range_out to NULL
and len to 0. All existing callers of pm_process_pagemap_range
will not dereference range_out if len is 0.

Bug: 14683277
Change-Id: If405651ad034dda780b93fab2dc616e177a0b917
m_process.c
ae7f672c066d09e719dcf21d943d2842c7001ebb 06-May-2014 Torne (Richard Coles) <torne@google.com> Add {BEGIN,END}_DECLS to header file.

Enable this header to be cleanly included in C++ code.

Change-Id: Ie4ae60629661237ce07b49b17802f01bf95552d8
nclude/pagemap/pagemap.h
d3fa8e5f889cd8fdcc9029af421ca755bd20ac1e 28-Aug-2013 Carton He <carton.he@marvell.com> libpagemap: fix memory leak in pm_process_destroy()

procrank/librank not impacted because they end quickly. But other
programs that use libpagemap and last for long time can easily see this
memory leak.

Change-Id: I8c9e9444555bef9145c9d89850987a29f15a9b3b
Signed-off-by: Carton He <carton.he@marvell.com>
m_process.c
931563e96d9ff65d7d2a4642c8f26fb19e47be47 22-Jun-2013 Colin Cross <ccross@android.com> libpagemap: add pm_process_usage_flags

Add pm_process_usage flags to get memory usage by a process, only
counting pages with specified flags set.

Change-Id: I900b673ddbb5ae92312773a8670dd59769617268
nclude/pagemap/pagemap.h
m_process.c
b46165ce8c58e4c325dae07bf898a6d8a109c70d 22-Jun-2013 Colin Cross <ccross@android.com> libpagemap: fix new kernel flag names to start with PM_PAGE_

Change-Id: I6b030d9d0356d63b3ddb853de304407bc70b38c4
nclude/pagemap/pagemap.h
6af7cf28ec6ec7d0e32a77b2ba36db514120d561 21-Jun-2013 Colin Cross <ccross@android.com> libpagemap: count swapped pages

Add a new memusage field for swapped pages.

Change-Id: I857143a5fdd294315dd89e834b1217a219f10479
nclude/pagemap/pagemap.h
m_map.c
m_memusage.c
fdcb71454499bb31143beb903be00bd88105dc33 23-May-2013 Colin Cross <ccross@android.com> libpagemap: add pm_map_usage_flags

Add pm_map_usage_flags, which is the same as pm_map_usage but only
counts pages with the specified flags set. This can be used to
only count "swapbacked" pages, which are pages that cannot be
flushed back to disk without using swap.

Change-Id: I6367555d9385502c797935849bb4221a8354e251
nclude/pagemap/pagemap.h
m_map.c
e6ef997fe214e8daefbaff45ecbfefdad187c25c 22-May-2013 Colin Cross <ccross@android.com> libpagemap: add page flags for new kernels

Change-Id: If4a4a2bbe9b1a68c5dce1151cf8b7c60cae1a3fa
nclude/pagemap/pagemap.h
10d56313afcd318aade2958ad412ca208e3f792e 23-May-2013 Colin Cross <ccross@android.com> libpagemap: add definition for mask of permission flags

Change-Id: Ibd0b26e4f5245592152d2c8ef00e7da1ad5f3fdf
nclude/pagemap/pagemap.h
dccd379d2dc4f903b9f9dfd00e2f60747a7bb289 23-May-2013 Colin Cross <ccross@android.com> libpagemap: fix vss calculation

pm_map_usage was not incrementing vss for pages that were in the
process's map but not occupying a physical page. Move the
vss increment above the check for present mappings.

Change-Id: I2706e6fbcbfe7d70f10950333a486d690bc84d6c
m_map.c
5d461218f8c38dadf831ccc52ac6e5153687cf17 16-May-2013 Colin Cross <ccross@android.com> libpagemap: fix reusing previous name for mappings with no name

Mappings that are not from a file do not have a name. The sscanf
will read all of the fields up to the name, and then leave name
untouched. This causes the previous name to be reused. Reset
name to an empty string before each call to sscanf.

Change-Id: Ib146732983eb074d0d4773be094efa0b672f5ed2
m_process.c
76e6cb55fed01824e44306aa0485a3f8f122b228 21-Jan-2012 Selim Gurun <sgurun@google.com> Fix various issues in procrank.

Fixed these problems:
1. Page swapped bit was not extracted correctly.
2. Pages were ignored when page present bit is not set.
3. Bit operations were not correct.
4. There was a compiler warning about unsigned/signed comparision.
5. Line limit was too short for the map file. This was causing procrank
to generate a warning and remove the related process from results.

Change-Id: Ifed3913a49b15f59010cfa842090a13228074df9
nclude/pagemap/pagemap.h
m_map.c
m_process.c
6620157c0f583c4c7a59d1d595589dbb2b3ae4b5 13-Jul-2011 Colin Cross <ccross@android.com> Handle EOF when reading /proc/<pid>/pagemap

Instead of handling maps with the name "[vectors]" specially,
silently ignore EOF when reading from /proc/<pid>/pagemap, which
occurs any time a a mapping is outside of the userspace range.

Change-Id: I674ade1eab6fd7732c6d9e120d0750cca5415b25
m_process.c
5923f33ed7cf186ceac3541987efcc32beb29ab9 13-Jul-2011 Colin Cross <ccross@android.com> Ignore the vector page in /proc/<pid>/maps

In kernel 2.6.37, the vector page was added to /proc/<pid>/maps,
but because it is located above TASK_SIZE (usually 0xbf000000),
it is considered to be in the kernel's address space, not the
process', so it doesn't show up in /proc/<pid>/pagemap.

When the vector page is detected, using the name "[vectors]",
remove it from the map.

Change-Id: I5f0758bbe5d2b927056fa9fee684fea63dd0fa4b
m_process.c
328808449dccdce0ec4100174446a8b2c964a6b1 05-May-2010 Dan Bornstein <danfuzz@android.com> For issue #2651381, allow library prelinking.

Change-Id: I1b3e13f0e16b51604852437b32b1d8309471abc8
ndroid.mk
e16cb84e2324f05334d18dcf5956f20f44262b62 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid.mk
ODULE_LICENSE_APACHE2
OTICE
nclude/pagemap/pagemap.h
m_kernel.c
m_map.c
m_map.h
m_memusage.c
m_process.c
19ddb4b1680760e2d6863c3003976882ebd9d0fa 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid.mk
ODULE_LICENSE_APACHE2
OTICE
nclude/pagemap/pagemap.h
m_kernel.c
m_map.c
m_map.h
m_memusage.c
m_process.c
7341494707810f709855ea85ce03a8ec3ac8dbaf 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
ndroid.mk
ODULE_LICENSE_APACHE2
OTICE
nclude/pagemap/pagemap.h
m_kernel.c
m_map.c
m_map.h
m_memusage.c
m_process.c