Initial msm8x64 memory tracker HAL
Reads memory info from kgsl to track unaccounted for GL and ION
memory. Right now it has to parse every allocation and then
cross-reference it against /proc/pid/smaps. It would be faster
to modify the kgsl driver to keep counters that could just be
read directly.
Bug: 10294768
Change-Id: Icb17558f03ce53bc594fbee097e51fe82e15dc31
diff --git a/libmemtrack/memtrack_msm.h b/libmemtrack/memtrack_msm.h
new file mode 100644
index 0000000..cfdefc0
--- /dev/null
+++ b/libmemtrack/memtrack_msm.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _MEMTRACK_EXYNOS5_H_
+#define _MEMTRACK_EXYNOS5_H_
+
+int kgsl_memtrack_get_memory(pid_t pid, enum memtrack_type type,
+ struct memtrack_record *records,
+ size_t *num_records);
+
+#endif