Skip to Content
Android Developer Tools深入精要
book

Android Developer Tools深入精要

by Mike Wolfson
July 2014
Intermediate to advanced
248 pages
5h 19m
Chinese
GoTop Information, Inc.
Content preview from Android Developer Tools深入精要
152
|
第十章:監控系統資源
4.
點選右側的「
Threads
」分頁( )。
5.
點擊「
Refresh
」按鈕( )確保看到的是目前的執行緒。
[Page-156]
查看執行緒資訊
執行這過程的輸出如圖
10-3
所示,最上方的分頁裡含有多種關於執行緒狀態與執行時
間的資訊。
在最下方分頁裡有與單一執行緒有關的
stacktrace
的資訊。點選上方畫面中的一個執行
緒查看詳細資訊。
10-3
查看關於
Heap
執行的資訊
Heap
Heap
工具可以很簡單地查看一個處理程序所使用的
heap
記憶體大小。這在要追蹤某
時間點的記憶體使用情況很有幫助。
執行
Heap
工具
執行
Heap
工具的步驟為:
偵錯監控伺服器(
Dalvik Debug Monitor Server, DDMS
|
153
1.
在裝置上執行你想分析的
app
2.
在「
Devices
」分頁中,找到你的應用程式且點選想追蹤的處理程序。
3.
點選「
Update Heap
」圖示( )打開分析功能(在你完成後要停止追蹤時會再
點擊一次)
4.
點選「
Cause GC
」按鈕( )收集當下的
Heap
資訊。
5.
點選右側的「
Heap
」分頁( )。
[Page-157]
查看
Heap
資訊
執行這過程的輸出如圖
10-4
所示。
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Android 高效能多執行緒

Android 高效能多執行緒

Anders Goransson
深入淺出 jQuery

深入淺出 jQuery

Ryan Benedetti, Ronan Cranley
HTML5 錦囊妙計

HTML5 錦囊妙計

Christopher Schmitt, Kyle Simpson

Publisher Resources

ISBN: 9789863470861