Rajeev Kumar | f0216a8 | 2018-01-24 14:40:36 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 Google, Inc |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #pragma once |
| 18 | |
| 19 | #include <sys/cdefs.h> |
| 20 | __BEGIN_DECLS |
| 21 | |
| 22 | /** |
| 23 | * Logs the change in LMKD state which is used as start/stop boundaries for logging |
| 24 | * LMK_KILL_OCCURRED event. |
| 25 | * Code: LMK_STATE_CHANGED = 54 |
| 26 | */ |
| 27 | int |
| 28 | stats_write_lmk_state_changed(android_log_context ctx, int32_t code, int32_t state); |
| 29 | |
| 30 | /** |
| 31 | * Logs the event when LMKD kills a process to reduce memory pressure. |
| 32 | * Code: LMK_KILL_OCCURRED = 51 |
| 33 | */ |
| 34 | int |
| 35 | stats_write_lmk_kill_occurred(android_log_context ctx, int32_t code, int32_t uid, |
| 36 | char const* process_name, int32_t oom_score, int64_t pgfault, |
| 37 | int64_t pgmajfault, int64_t rss_in_bytes, int64_t cache_in_bytes, |
| 38 | int64_t swap_in_bytes); |
| 39 | __END_DECLS |