OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Intel Inc. All rights reserved. | 2 * Copyright (C) 2012 Intel 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return map; | 69 return map; |
70 } | 70 } |
71 | 71 |
72 } // namespace anonymous | 72 } // namespace anonymous |
73 | 73 |
74 UserTiming::UserTiming(Performance* performance) | 74 UserTiming::UserTiming(Performance* performance) |
75 : m_performance(performance) | 75 : m_performance(performance) |
76 { | 76 { |
77 } | 77 } |
78 | 78 |
79 static void insertPerformanceEntry(PerformanceEntryMap& performanceEntryMap, Pas
sRefPtrWillBeRawPtr<PerformanceEntry> performanceEntry) | 79 static void insertPerformanceEntry(PerformanceEntryMap& performanceEntryMap, Per
formanceEntry* entry) |
80 { | 80 { |
81 RefPtrWillBeRawPtr<PerformanceEntry> entry = performanceEntry; | |
82 PerformanceEntryMap::iterator it = performanceEntryMap.find(entry->name()); | 81 PerformanceEntryMap::iterator it = performanceEntryMap.find(entry->name()); |
83 if (it != performanceEntryMap.end()) | 82 if (it != performanceEntryMap.end()) |
84 it->value.append(entry); | 83 it->value.append(entry); |
85 else { | 84 else { |
86 PerformanceEntryVector vector(1); | 85 PerformanceEntryVector vector(1); |
87 vector[0] = entry; | 86 vector[0] = entry; |
88 performanceEntryMap.set(entry->name(), vector); | 87 performanceEntryMap.set(entry->name(), vector); |
89 } | 88 } |
90 } | 89 } |
91 | 90 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 return convertToEntrySequence(m_measuresMap); | 211 return convertToEntrySequence(m_measuresMap); |
213 } | 212 } |
214 | 213 |
215 PerformanceEntryVector UserTiming::getMeasures(const String& name) const | 214 PerformanceEntryVector UserTiming::getMeasures(const String& name) const |
216 { | 215 { |
217 return getEntrySequenceByName(m_measuresMap, name); | 216 return getEntrySequenceByName(m_measuresMap, name); |
218 } | 217 } |
219 | 218 |
220 DEFINE_TRACE(UserTiming) | 219 DEFINE_TRACE(UserTiming) |
221 { | 220 { |
222 #if ENABLE(OILPAN) | |
223 visitor->trace(m_performance); | 221 visitor->trace(m_performance); |
224 visitor->trace(m_marksMap); | 222 visitor->trace(m_marksMap); |
225 visitor->trace(m_measuresMap); | 223 visitor->trace(m_measuresMap); |
226 #endif | |
227 } | 224 } |
228 | 225 |
229 } // namespace blink | 226 } // namespace blink |
OLD | NEW |