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

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

Issue 408443002: Remove TRACE_EVENT_PHASE_INSTANT_WITH_SCOPE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use 'I' for phase id to match Chromium Created 6 years, 5 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
« no previous file with comments | « no previous file | Source/platform/TraceEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
36 #include "wtf/Functional.h" 36 #include "wtf/Functional.h"
37 #include "wtf/MainThread.h" 37 #include "wtf/MainThread.h"
38 #include "wtf/text/StringHash.h" 38 #include "wtf/text/StringHash.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 void TraceEventDispatcher::dispatchEventOnAnyThread(char phase, const unsigned c har*, const char* name, unsigned long long id, 42 void TraceEventDispatcher::dispatchEventOnAnyThread(char phase, const unsigned c har*, const char* name, unsigned long long id,
43 int numArgs, const char* const* argNames, const unsigned char* argTypes, con st unsigned long long* argValues, 43 int numArgs, const char* const* argNames, const unsigned char* argTypes, con st unsigned long long* argValues,
44 unsigned char flags, double timestamp) 44 unsigned char flags, double timestamp)
45 { 45 {
46 if (phase == TRACE_EVENT_PHASE_INSTANT_WITH_SCOPE)
47 phase = TRACE_EVENT_PHASE_INSTANT;
48 TraceEventDispatcher* self = instance(); 46 TraceEventDispatcher* self = instance();
49 { 47 {
50 MutexLocker locker(self->m_mutex); 48 MutexLocker locker(self->m_mutex);
51 if (self->m_handlers.find(std::make_pair(name, phase)) == self->m_handle rs.end()) 49 if (self->m_handlers.find(std::make_pair(name, phase)) == self->m_handle rs.end())
52 return; 50 return;
53 } 51 }
54 self->enqueueEvent(TraceEvent(timestamp, phase, name, id, currentThread(), n umArgs, argNames, argTypes, argValues)); 52 self->enqueueEvent(TraceEvent(timestamp, phase, name, id, currentThread(), n umArgs, argNames, argTypes, argValues));
55 if (isMainThread()) 53 if (isMainThread())
56 self->processBackgroundEvents(); 54 self->processBackgroundEvents();
57 } 55 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ASSERT(isMainThread()); 152 ASSERT(isMainThread());
155 if (index == kNotFound || m_argumentTypes[index] != expectedType) { 153 if (index == kNotFound || m_argumentTypes[index] != expectedType) {
156 ASSERT_NOT_REACHED(); 154 ASSERT_NOT_REACHED();
157 return missingValue; 155 return missingValue;
158 } 156 }
159 return m_argumentValues[index]; 157 return m_argumentValues[index];
160 } 158 }
161 159
162 } // namespace blink 160 } // namespace blink
163 161
OLDNEW
« no previous file with comments | « no previous file | Source/platform/TraceEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698