Skip to content
Snippets Groups Projects
Commit 017d54fd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "lrdp-v2: Ignore negative RSS values"

parents d025a0db cfc6ef72
No related branches found
No related tags found
No related merge requests found
...@@ -113,6 +113,13 @@ def get_rss(ramdump, task_struct): ...@@ -113,6 +113,13 @@ def get_rss(ramdump, task_struct):
anon_rss = ramdump.read_word(mm_struct + offset_rss_stat + offset_anon_rss) anon_rss = ramdump.read_word(mm_struct + offset_rss_stat + offset_anon_rss)
rss = ramdump.read_word(mm_struct + offset_rss_stat + offset_rss) rss = ramdump.read_word(mm_struct + offset_rss_stat + offset_rss)
file_rss = ramdump.read_word(mm_struct + offset_rss_stat + offset_file_rss) file_rss = ramdump.read_word(mm_struct + offset_rss_stat + offset_file_rss)
# Ignore negative RSS values
if anon_rss > 0x80000000:
anon_rss = 0
if rss > 0x80000000:
rss = 0
if file_rss > 0x80000000:
file_rss = 0
total_rss = rss + anon_rss + file_rss total_rss = rss + anon_rss + file_rss
return total_rss return total_rss
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment