OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 using namespace std; | 99 using namespace std; |
100 | 100 |
101 namespace WebCore { | 101 namespace WebCore { |
102 | 102 |
103 using namespace HTMLNames; | 103 using namespace HTMLNames; |
104 | 104 |
105 #if !ENABLE(OILPAN) | 105 #if !ENABLE(OILPAN) |
106 void* Node::operator new(size_t size) | 106 void* Node::operator new(size_t size) |
107 { | 107 { |
108 ASSERT(isMainThread()); | 108 ASSERT(isMainThread()); |
109 return partitionAlloc(Partitions::getObjectModelPartition(), size); | 109 void* ptr = partitionAlloc(Partitions::getObjectModelPartition(), size); |
110 Partitions::addDOMMemoryUsage(partitionAllocGetSize(ptr)); | |
haraken
2014/05/28 07:11:34
Won't this affect performance? I think this call p
kouhei (in TOK)
2014/05/28 07:35:20
Ack. Will test.
esprehn
2014/05/28 08:38:14
Lots of nodes are not reachable or even reclaimabl
Hannes Payer (out of office)
2014/05/28 11:00:07
Is this call here causing the reported performance
eseidel
2014/05/29 05:49:49
Why would you want to report it during Node alloc?
| |
111 return ptr; | |
110 } | 112 } |
111 | 113 |
112 void Node::operator delete(void* ptr) | 114 void Node::operator delete(void* ptr) |
113 { | 115 { |
114 ASSERT(isMainThread()); | 116 ASSERT(isMainThread()); |
117 Partitions::subtractDOMMemoryUsage(partitionAllocGetSize(ptr)); | |
115 partitionFree(ptr); | 118 partitionFree(ptr); |
116 } | 119 } |
117 #endif | 120 #endif |
118 | 121 |
119 #if DUMP_NODE_STATISTICS | 122 #if DUMP_NODE_STATISTICS |
120 static HashSet<Node*> liveNodeSet; | 123 static HashSet<Node*> liveNodeSet; |
121 #endif | 124 #endif |
122 | 125 |
123 void Node::dumpStatistics() | 126 void Node::dumpStatistics() |
124 { | 127 { |
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2578 node->showTreeForThis(); | 2581 node->showTreeForThis(); |
2579 } | 2582 } |
2580 | 2583 |
2581 void showNodePath(const WebCore::Node* node) | 2584 void showNodePath(const WebCore::Node* node) |
2582 { | 2585 { |
2583 if (node) | 2586 if (node) |
2584 node->showNodePathForThis(); | 2587 node->showNodePathForThis(); |
2585 } | 2588 } |
2586 | 2589 |
2587 #endif | 2590 #endif |
OLD | NEW |