Move debugging info into tech section
Change-Id: I0c848fdea00f6c354e79ca29f3b71d9fa52ed326
diff --git a/src/tech/debugging/index.md b/src/tech/debugging/index.md
new file mode 100644
index 0000000..4ae4fc9
--- /dev/null
+++ b/src/tech/debugging/index.md
@@ -0,0 +1,23 @@
+<!--
+ Copyright 2010 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.
+-->
+
+# Debugging the Android platform #
+
+The following sections contain information, documentation, tips and tricks
+about debugging Android at the platform level, typically during development
+of platform-level features.
+
+[» Debugging Native Memory Use](/tech/debugging/native-memory.html)
diff --git a/src/tech/debugging/native-memory.md b/src/tech/debugging/native-memory.md
new file mode 100644
index 0000000..755a429
--- /dev/null
+++ b/src/tech/debugging/native-memory.md
@@ -0,0 +1,39 @@
+<!--
+ Copyright 2011 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.
+-->
+
+# Debugging Native Memory Use #
+
+This tip assume that you are working with an eng
+or userdebug build of the platform, not on a production device.
+
+Android's native memory allocator has some useful debugging features. You
+can turn on memory tracking with:
+
+ $ adb shell setprop libc.debug.malloc 1
+ $ adb shell stop
+ $ adb shell start
+
+You need to restart the runtime so that zygote and all processes launched from
+it are restarted with the property set. Now all Dalvik processes have memory
+tracking turned on. You can look at these with DDMS, but first you need to
+turn on its native memory UI:
+
+ - Open ~/.android/ddms.cfg
+ - Add a line "native=true"
+
+Upon relaunching DDMS and selecting a process, you can switch to the new
+native allocation tab and populate it with a list of allocations. This is
+especially useful for debugging memory leaks.
diff --git a/src/tech/debugging/sidebar2.md b/src/tech/debugging/sidebar2.md
new file mode 100644
index 0000000..3ab9f67
--- /dev/null
+++ b/src/tech/debugging/sidebar2.md
@@ -0,0 +1,2 @@
+# Debugging Topics #
+- [Native Memory Use](/tech/debugging/native-memory.html)
diff --git a/src/tech/index.md b/src/tech/index.md
index 9bf5867..3fec768 100644
--- a/src/tech/index.md
+++ b/src/tech/index.md
@@ -30,6 +30,13 @@
[» Dalvik Information](/tech/dalvik/index.html)
+## Debugging ##
+Android is a large and complex system. This section includes tips and tricks
+about debugging at the platform level.
+
+[» Debugging Information](/tech/debugging/index.html)
+
+
## Encryption Technical Information ##
The Android Open-Source Project includes the ability to encrypt the user's data.
This document is written for 3rd parties developing Android devices who want to
diff --git a/src/tech/sidebar.md b/src/tech/sidebar.md
index b770eb8..75a4379 100644
--- a/src/tech/sidebar.md
+++ b/src/tech/sidebar.md
@@ -1,3 +1,4 @@
# Topics #
- [Dalvik](/tech/dalvik/index.html)
+- [Debugging](/tech/debugging/index.html)
- [Encryption](/tech/encryption/index.html)