| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 } // namespace | 78 } // namespace |
| 79 | 79 |
| 80 UserTiming::UserTiming(PerformanceBase& performance) | 80 UserTiming::UserTiming(PerformanceBase& performance) |
| 81 : m_performance(&performance) {} | 81 : m_performance(&performance) {} |
| 82 | 82 |
| 83 static void insertPerformanceEntry(PerformanceEntryMap& performanceEntryMap, | 83 static void insertPerformanceEntry(PerformanceEntryMap& performanceEntryMap, |
| 84 PerformanceEntry& entry) { | 84 PerformanceEntry& entry) { |
| 85 PerformanceEntryMap::iterator it = performanceEntryMap.find(entry.name()); | 85 PerformanceEntryMap::iterator it = performanceEntryMap.find(entry.name()); |
| 86 if (it != performanceEntryMap.end()) { | 86 if (it != performanceEntryMap.end()) { |
| 87 it->value.append(&entry); | 87 it->value.push_back(&entry); |
| 88 } else { | 88 } else { |
| 89 PerformanceEntryVector vector(1); | 89 PerformanceEntryVector vector(1); |
| 90 vector[0] = Member<PerformanceEntry>(entry); | 90 vector[0] = Member<PerformanceEntry>(entry); |
| 91 performanceEntryMap.set(entry.name(), vector); | 91 performanceEntryMap.set(entry.name(), vector); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 static void clearPeformanceEntries(PerformanceEntryMap& performanceEntryMap, | 95 static void clearPeformanceEntries(PerformanceEntryMap& performanceEntryMap, |
| 96 const String& name) { | 96 const String& name) { |
| 97 if (name.isNull()) { | 97 if (name.isNull()) { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 return getEntrySequenceByName(m_measuresMap, name); | 245 return getEntrySequenceByName(m_measuresMap, name); |
| 246 } | 246 } |
| 247 | 247 |
| 248 DEFINE_TRACE(UserTiming) { | 248 DEFINE_TRACE(UserTiming) { |
| 249 visitor->trace(m_performance); | 249 visitor->trace(m_performance); |
| 250 visitor->trace(m_marksMap); | 250 visitor->trace(m_marksMap); |
| 251 visitor->trace(m_measuresMap); | 251 visitor->trace(m_measuresMap); |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace blink | 254 } // namespace blink |
| OLD | NEW |