Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: Source/core/inspector/InspectorTimelineAgent.cpp

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 record->setCounters(counters.release()); 594 record->setCounters(counters.release());
595 } 595 }
596 } 596 }
597 597
598 void InspectorTimelineAgent::setNativeHeapStatistics(TypeBuilder::Timeline::Time lineEvent* record) 598 void InspectorTimelineAgent::setNativeHeapStatistics(TypeBuilder::Timeline::Time lineEvent* record)
599 { 599 {
600 if (!m_memoryAgent) 600 if (!m_memoryAgent)
601 return; 601 return;
602 if (!m_state->getBoolean(TimelineAgentState::includeNativeMemoryStatistics)) 602 if (!m_state->getBoolean(TimelineAgentState::includeNativeMemoryStatistics))
603 return; 603 return;
604 HashMap<String, size_t> map;
605 m_memoryAgent->getProcessMemoryDistributionMap(&map);
606 RefPtr<InspectorObject> stats = InspectorObject::create(); 604 RefPtr<InspectorObject> stats = InspectorObject::create();
607 for (HashMap<String, size_t>::iterator it = map.begin(); it != map.end(); ++ it)
608 stats->setNumber(it->key, it->value);
609 size_t privateBytes = 0; 605 size_t privateBytes = 0;
610 size_t sharedBytes = 0; 606 size_t sharedBytes = 0;
611 MemoryUsageSupport::processMemorySizesInBytes(&privateBytes, &sharedBytes); 607 MemoryUsageSupport::processMemorySizesInBytes(&privateBytes, &sharedBytes);
612 stats->setNumber("PrivateBytes", privateBytes); 608 stats->setNumber("PrivateBytes", privateBytes);
613 record->setNativeHeapStatistics(stats.release()); 609 record->setNativeHeapStatistics(stats.release());
614 } 610 }
615 611
616 void InspectorTimelineAgent::setFrameIdentifier(InspectorObject* record, Frame* frame) 612 void InspectorTimelineAgent::setFrameIdentifier(InspectorObject* record, Frame* frame)
617 { 613 {
618 if (!frame || !m_pageAgent) 614 if (!frame || !m_pageAgent)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 return m_timeConverter.fromMonotonicallyIncreasingTime(WTF::monotonicallyInc reasingTime()); 723 return m_timeConverter.fromMonotonicallyIncreasingTime(WTF::monotonicallyInc reasingTime());
728 } 724 }
729 725
730 Page* InspectorTimelineAgent::page() 726 Page* InspectorTimelineAgent::page()
731 { 727 {
732 return m_pageAgent ? m_pageAgent->page() : 0; 728 return m_pageAgent ? m_pageAgent->page() : 0;
733 } 729 }
734 730
735 } // namespace WebCore 731 } // namespace WebCore
736 732
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/core/inspector/MemoryInstrumentationImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698