コード例 #1
0
 /// <summary>
 /// Sends a request to the VM to send the information about all the allocations that have
 /// happened since the call to <seealso cref="#enableAllocationTracker(boolean)"/> with <var>enable</var>
 /// set to <code>null</code>. This is asynchronous.
 /// <p/>The allocation information can be accessed by <seealso cref="ClientData#getAllocations()"/>.
 /// The notification that the new data is available will be received through
 /// <seealso cref="IClientChangeListener#clientChanged(Client, int)"/> with a <code>changeMask</code>
 /// containing the mask <seealso cref="#CHANGE_HEAP_ALLOCATIONS"/>.
 /// </summary>
 public virtual void requestAllocationDetails()
 {
     try
     {
         HandleHeap.sendREAL(this);
     }
     catch (IOException e)
     {
         Log.e("ddmlib", e);
     }
 }
コード例 #2
0
 /// <summary>
 /// Enables or disables the Allocation tracker for this client.
 /// <p/>If enabled, the VM will start tracking allocation informations. A call to
 /// <seealso cref="#requestAllocationDetails()"/> will make the VM sends the information about all the
 /// allocations that happened between the enabling and the request. </summary>
 /// <param name="enable"> </param>
 /// <seealso cref= #requestAllocationDetails() </seealso>
 public virtual void enableAllocationTracker(bool enable)
 {
     try
     {
         HandleHeap.sendREAE(this, enable);
     }
     catch (IOException e)
     {
         Log.e("ddmlib", e);
     }
 }
コード例 #3
0
 /// <summary>
 /// Sends a request to the VM to send the enable status of the method profiling.
 /// This is asynchronous.
 /// <p/>The allocation status can be accessed by <seealso cref="ClientData#getAllocationStatus()"/>.
 /// The notification that the new status is available will be received through
 /// <seealso cref="IClientChangeListener#clientChanged(Client, int)"/> with a <code>changeMask</code>
 /// containing the mask <seealso cref="#CHANGE_HEAP_ALLOCATION_STATUS"/>.
 /// </summary>
 public virtual void requestMethodProfilingStatus()
 {
     try
     {
         HandleHeap.sendREAQ(this);
     }
     catch (IOException e)
     {
         Log.e("ddmlib", e);
     }
 }
コード例 #4
0
 /// <summary>
 /// Forces the client to execute its garbage collector.
 /// </summary>
 public virtual void executeGarbageCollector()
 {
     try
     {
         HandleHeap.sendHPGC(this);
     }
     catch (IOException)
     {
         Log.w("ddms", "Send of HPGC message failed");
         // ignore
     }
 }
コード例 #5
0
        /// <summary>
        /// Makes the VM dump an HPROF file
        /// </summary>
        public virtual void dumpHprof()
        {
            bool canStream = mClientData.hasFeature(ClientData.FEATURE_HPROF_STREAMING);

            try
            {
                if (canStream)
                {
                    HandleHeap.sendHPDS(this);
                }
                else
                {
                    string file = "/sdcard/" + mClientData.clientDescription.replaceAll("\\:.*", "") + ".hprof";
                    HandleHeap.sendHPDU(this, file);
                }
            }
            catch (IOException)
            {
                Log.w("ddms", "Send of HPDU message failed");
                // ignore
            }
        }