Diff
Modified: trunk/Source/WebCore/ChangeLog (158109 => 158110)
--- trunk/Source/WebCore/ChangeLog 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebCore/ChangeLog 2013-10-28 15:22:29 UTC (rev 158110)
@@ -1,3 +1,15 @@
+2013-10-28 Bastien Nocera <[email protected]>
+
+ Name all the GLib timeout sources
+ https://bugs.webkit.org/show_bug.cgi?id=123229
+
+ Reviewed by Anders Carlsson.
+
+ Give a name to GLib timeout sources, this is helpful when
+ profiling WebKitGTK applications.
+
+ No new tests, no change in functionality.
+
2013-10-28 Philippe Normand <[email protected]>
MediaStreamTrackPrivate's m_client uninitialized
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (158109 => 158110)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -450,6 +450,7 @@
// See also https://bugs.webkit.org/show_bug.cgi?id=117354
if (newState == GST_STATE_READY && !m_readyTimerHandler) {
m_readyTimerHandler = g_timeout_add_seconds(gReadyStateTimerInterval, reinterpret_cast<GSourceFunc>(mediaPlayerPrivateReadyStateTimeoutCallback), this);
+ g_source_set_name_by_id(m_readyTimerHandler, "[WebKit] mediaPlayerPrivateReadyStateTimeoutCallback");
} else if (newState != GST_STATE_READY && m_readyTimerHandler) {
g_source_remove(m_readyTimerHandler);
m_readyTimerHandler = 0;
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp (158109 => 158110)
--- trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -270,6 +270,7 @@
// See: https://bugzilla.gnome.org/show_bug.cgi?id=610830.
priv->timeoutId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, webkitVideoSinkTimeoutCallback,
gst_object_ref(sink), reinterpret_cast<GDestroyNotify>(gst_object_unref));
+ g_source_set_name_by_id(priv->timeoutId, "[WebKit] webkitVideoSinkTimeoutCallback");
g_cond_wait(priv->dataCondition, priv->bufferMutex);
g_mutex_unlock(priv->bufferMutex);
Modified: trunk/Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.cpp (158109 => 158110)
--- trunk/Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -170,12 +170,16 @@
updateHudPosition();
// Start periodic updates of the progress bar.
- if (!m_progressBarUpdateId)
+ if (!m_progressBarUpdateId) {
m_progressBarUpdateId = g_timeout_add(PROGRESS_BAR_UPDATE_INTERVAL, reinterpret_cast<GSourceFunc>(progressBarUpdateCallback), this);
+ g_source_set_name_by_id(m_progressBarUpdateId, "[WebKit] progressBarUpdateCallback");
+ }
// Hide the hud in few seconds, if requested.
- if (autoHide)
+ if (autoHide) {
m_hudTimeoutId = g_timeout_add(HUD_AUTO_HIDE_INTERVAL, reinterpret_cast<GSourceFunc>(hideHudCallback), this);
+ g_source_set_name_by_id(m_hudTimeoutId, "[WebKit] hideHudCallback");
+ }
}
void FullscreenVideoControllerGtk::hideHud()
@@ -446,6 +450,7 @@
gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, TRUE, 0);
m_progressBarUpdateId = g_timeout_add(PROGRESS_BAR_UPDATE_INTERVAL, reinterpret_cast<GSourceFunc>(progressBarUpdateCallback), this);
+ g_source_set_name_by_id(m_progressBarUpdateId, "[WebKit] progressBarUpdateCallback");
playStateChanged();
}
Modified: trunk/Source/WebCore/platform/gtk/SharedTimerGtk.cpp (158109 => 158110)
--- trunk/Source/WebCore/platform/gtk/SharedTimerGtk.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebCore/platform/gtk/SharedTimerGtk.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -43,7 +43,7 @@
sharedTimerFiredFunction = f;
}
-static gboolean timeout_cb(gpointer)
+static gboolean sharedTimerTimeoutCallback(gpointer)
{
if (sharedTimerFiredFunction)
sharedTimerFiredFunction();
@@ -57,7 +57,8 @@
guint intervalInMS = static_cast<guint>(interval * 1000);
stopSharedTimer();
- sharedTimer = g_timeout_add_full(GDK_PRIORITY_REDRAW, intervalInMS, timeout_cb, 0, 0);
+ sharedTimer = g_timeout_add_full(GDK_PRIORITY_REDRAW, intervalInMS, sharedTimerTimeoutCallback, 0, 0);
+ g_source_set_name_by_id(sharedTimer, "[WebKit] sharedTimerTimeoutCallback");
}
void stopSharedTimer()
Modified: trunk/Source/WebCore/plugins/gtk/gtk2xtbin.c (158109 => 158110)
--- trunk/Source/WebCore/plugins/gtk/gtk2xtbin.c 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebCore/plugins/gtk/gtk2xtbin.c 2013-10-28 15:22:29 UTC (rev 158110)
@@ -393,6 +393,7 @@
g_timeout_add(25,
(GSourceFunc)xt_event_polling_timer_callback,
xtdisplay);
+ g_source_set_name_by_id(xt_polling_timer_id, "[WebKit] xt_event_polling_timer_callback");
}
/* Bump up our usage count */
Modified: trunk/Source/WebKit/gtk/ChangeLog (158109 => 158110)
--- trunk/Source/WebKit/gtk/ChangeLog 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebKit/gtk/ChangeLog 2013-10-28 15:22:29 UTC (rev 158110)
@@ -1,5 +1,15 @@
2013-10-28 Bastien Nocera <[email protected]>
+ Name all the GLib timeout sources
+ https://bugs.webkit.org/show_bug.cgi?id=123229
+
+ Reviewed by Anders Carlsson.
+
+ Give a name to GLib timeout sources, this is helpful when
+ profiling WebKitGTK applications.
+
+2013-10-28 Bastien Nocera <[email protected]>
+
Replace 0 timeouts g_timeout_add() by g_idle_add()
https://bugs.webkit.org/show_bug.cgi?id=123260
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp (158109 => 158110)
--- trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -169,6 +169,7 @@
m_needsExtraFlush = false;
double nextFlush = std::max((1 / gFramesPerSecond) - (currentTime() - m_lastFlushTime), 0.0);
m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 1000 * nextFlush, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
+ g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
}
return true;
@@ -269,6 +270,7 @@
scheduleLayerFlush();
m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 500, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
+ g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
}
void AcceleratedCompositingContext::setNonCompositedContentsNeedDisplay(const IntRect& rect)
@@ -336,6 +338,7 @@
// starve WebCore timers, which have a lower priority.
double nextFlush = std::max(gScheduleDelay - (currentTime() - m_lastFlushTime), 0.0);
m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, nextFlush * 1000, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
+ g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
}
bool AcceleratedCompositingContext::flushPendingLayerChanges()
Modified: trunk/Source/WebKit2/ChangeLog (158109 => 158110)
--- trunk/Source/WebKit2/ChangeLog 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebKit2/ChangeLog 2013-10-28 15:22:29 UTC (rev 158110)
@@ -1,3 +1,13 @@
+2013-10-28 Bastien Nocera <[email protected]>
+
+ Name all the GLib timeout sources
+ https://bugs.webkit.org/show_bug.cgi?id=123229
+
+ Reviewed by Anders Carlsson.
+
+ Give a name to GLib timeout sources, this is helpful when
+ profiling WebKitGTK applications.
+
2013-10-28 Carlos Garcia Campos <[email protected]>
Unreviewed. Fix make distcheck.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp (158109 => 158110)
--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -304,6 +304,7 @@
const double targetFPS = 60;
double nextFlush = std::max((1 / targetFPS) - (currentTime() - m_lastFlushTime), 0.0);
m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, nextFlush * 1000.0, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
+ g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
}
}
@@ -402,8 +403,10 @@
return;
// We use a GLib timer because otherwise GTK+ event handling during dragging can starve WebCore timers, which have a lower priority.
- if (!m_layerFlushTimerCallbackId)
+ if (!m_layerFlushTimerCallbackId) {
m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
+ g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
+ }
}
void LayerTreeHostGtk::setLayerFlushSchedulingEnabled(bool layerFlushingEnabled)
Modified: trunk/Tools/ChangeLog (158109 => 158110)
--- trunk/Tools/ChangeLog 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Tools/ChangeLog 2013-10-28 15:22:29 UTC (rev 158110)
@@ -1,5 +1,15 @@
2013-10-28 Bastien Nocera <[email protected]>
+ Name all the GLib timeout sources
+ https://bugs.webkit.org/show_bug.cgi?id=123229
+
+ Reviewed by Anders Carlsson.
+
+ Give a name to GLib timeout sources, this is helpful when
+ profiling WebKitGTK applications.
+
+2013-10-28 Bastien Nocera <[email protected]>
+
Replace 0 timeouts g_timeout_add() by g_idle_add()
https://bugs.webkit.org/show_bug.cgi?id=123260
Modified: trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp (158109 => 158110)
--- trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -314,8 +314,11 @@
static const int timeoutSeconds = 30;
m_waitToDump = waitUntilDone;
- if (m_waitToDump && shouldSetWaitToDumpWatchdog())
- setWaitToDumpWatchdog(g_timeout_add_seconds(timeoutSeconds, waitToDumpWatchdogFired, 0));
+ if (m_waitToDump && shouldSetWaitToDumpWatchdog()) {
+ guint id = g_timeout_add_seconds(timeoutSeconds, waitToDumpWatchdogFired, 0);
+ g_source_set_name_by_id(id, "[WebKit] waitToDumpWatchdogFired");
+ setWaitToDumpWatchdog(id);
+ }
}
int TestRunner::windowCount()
Modified: trunk/Tools/GtkLauncher/main.c (158109 => 158110)
--- trunk/Tools/GtkLauncher/main.c 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Tools/GtkLauncher/main.c 2013-10-28 15:22:29 UTC (rev 158110)
@@ -157,7 +157,8 @@
GTK_BUTTONS_CLOSE,
"%s is now full screen. Press ESC or f to exit.", uri);
g_signal_connect_swapped(dialog, "response", G_CALLBACK(gtk_widget_destroy), dialog);
- g_timeout_add(1500, (GSourceFunc) webViewFullscreenMessageWindowClose, dialog);
+ guint id = g_timeout_add(1500, (GSourceFunc) webViewFullscreenMessageWindowClose, dialog);
+ g_source_set_name_by_id(id, "[WebKit] webViewFullscreenMessageWindowClose");
gtk_dialog_run(GTK_DIALOG(dialog));
}
return TRUE;
Modified: trunk/Tools/MiniBrowser/gtk/BrowserWindow.c (158109 => 158110)
--- trunk/Tools/MiniBrowser/gtk/BrowserWindow.c 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Tools/MiniBrowser/gtk/BrowserWindow.c 2013-10-28 15:22:29 UTC (rev 158110)
@@ -163,8 +163,10 @@
{
gdouble progress = webkit_web_view_get_estimated_load_progress(webView);
gtk_entry_set_progress_fraction(GTK_ENTRY(window->uriEntry), progress);
- if (progress == 1.0)
- g_timeout_add(500, (GSourceFunc)resetEntryProgress, window->uriEntry);
+ if (progress == 1.0) {
+ guint id = g_timeout_add(500, (GSourceFunc)resetEntryProgress, window->uriEntry);
+ g_source_set_name_by_id(id, "[WebKit] resetEntryProgress");
+ }
}
static void downloadStarted(WebKitWebContext *webContext, WebKitDownload *download, BrowserWindow *window)
@@ -311,6 +313,7 @@
gtk_widget_show(window->fullScreenMessageLabel);
window->fullScreenMessageLabelId = g_timeout_add_seconds(2, (GSourceFunc)fullScreenMessageTimeoutCallback, window);
+ g_source_set_name_by_id(window->fullScreenMessageLabelId, "[WebKit] fullScreenMessageTimeoutCallback");
gtk_widget_hide(window->toolbar);
window->searchBarVisible = gtk_widget_get_visible(GTK_WIDGET(window->searchBar));
browser_search_bar_close(window->searchBar);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp (158109 => 158110)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -60,6 +60,7 @@
m_waitToDumpWatchdogTimer = g_timeout_add(waitToDumpWatchdogTimerInterval * 1000,
waitToDumpWatchdogTimerCallback, 0);
+ g_source_set_name_by_id(m_waitToDumpWatchdogTimer, "[WebKit] waitToDumpWatchdogTimerCallback");
}
JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url)
Modified: trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp (158109 => 158110)
--- trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp 2013-10-28 15:16:04 UTC (rev 158109)
+++ trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp 2013-10-28 15:22:29 UTC (rev 158110)
@@ -68,8 +68,10 @@
void TestController::platformRunUntil(bool&, double timeout)
{
cancelTimeout();
- if (timeout != m_noTimeout)
+ if (timeout != m_noTimeout) {
gTimeoutSourceId = g_timeout_add(timeout * 1000, timeoutCallback, 0);
+ g_source_set_name_by_id(gTimeoutSourceId, "[WebKit] timeoutCallback");
+ }
gtk_main();
}