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

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

Issue 23818003: Revert "Allow configuring CPU profiler sampling interval" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 m_instrumentingAgents->setInspectorProfilerAgent(0); 127 m_instrumentingAgents->setInspectorProfilerAgent(0);
128 m_state->setBoolean(ProfilerAgentState::profilerEnabled, false); 128 m_state->setBoolean(ProfilerAgentState::profilerEnabled, false);
129 m_state->setBoolean(ProfilerAgentState::profileHeadersRequested, false); 129 m_state->setBoolean(ProfilerAgentState::profileHeadersRequested, false);
130 } 130 }
131 131
132 bool InspectorProfilerAgent::enabled() 132 bool InspectorProfilerAgent::enabled()
133 { 133 {
134 return m_state->getBoolean(ProfilerAgentState::profilerEnabled); 134 return m_state->getBoolean(ProfilerAgentState::profilerEnabled);
135 } 135 }
136 136
137 void InspectorProfilerAgent::setSamplingInterval(ErrorString* error, int interva l)
138 {
139 if (m_recordingCPUProfile) {
140 *error = "Cannot change sampling interval when profiling.";
141 return;
142 }
143 ScriptProfiler::setSamplingInterval(interval);
144 }
145
146 String InspectorProfilerAgent::getCurrentUserInitiatedProfileName(bool increment ProfileNumber) 137 String InspectorProfilerAgent::getCurrentUserInitiatedProfileName(bool increment ProfileNumber)
147 { 138 {
148 if (incrementProfileNumber) 139 if (incrementProfileNumber)
149 m_currentUserInitiatedProfileNumber = m_nextUserInitiatedProfileNumber++ ; 140 m_currentUserInitiatedProfileNumber = m_nextUserInitiatedProfileNumber++ ;
150 141
151 return String(userInitiatedProfileName) + "." + String::number(m_currentUser InitiatedProfileNumber); 142 return String(userInitiatedProfileName) + "." + String::number(m_currentUser InitiatedProfileNumber);
152 } 143 }
153 144
154 void InspectorProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<TypeBuilder: :Array<TypeBuilder::Profiler::ProfileHeader> >& headers) 145 void InspectorProfilerAgent::getProfileHeaders(ErrorString*, RefPtr<TypeBuilder: :Array<TypeBuilder::Profiler::ProfileHeader> >& headers)
155 { 146 {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 idleStarted(); 302 idleStarted();
312 } 303 }
313 304
314 void InspectorProfilerAgent::didLeaveNestedRunLoop() 305 void InspectorProfilerAgent::didLeaveNestedRunLoop()
315 { 306 {
316 idleFinished(); 307 idleFinished();
317 } 308 }
318 309
319 } // namespace WebCore 310 } // namespace WebCore
320 311
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorProfilerAgent.h ('k') | Source/devtools/front_end/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698