Changeset 158110 in webkit


Ignore:
Timestamp:
Oct 28, 2013 8:22:29 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Name all the GLib timeout sources
https://bugs.webkit.org/show_bug.cgi?id=123229

Patch by Bastien Nocera <hadess@hadess.net> on 2013-10-28
Reviewed by Anders Carlsson.

Source/WebCore:

Give a name to GLib timeout sources, this is helpful when
profiling WebKitGTK applications.

No new tests, no change in functionality.

Source/WebKit/gtk:

Give a name to GLib timeout sources, this is helpful when
profiling WebKitGTK applications.

Source/WebKit2:

Give a name to GLib timeout sources, this is helpful when
profiling WebKitGTK applications.

Tools:

Give a name to GLib timeout sources, this is helpful when
profiling WebKitGTK applications.

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r158109 r158110  
     12013-10-28  Bastien Nocera <hadess@hadess.net>
     2
     3        Name all the GLib timeout sources
     4        https://bugs.webkit.org/show_bug.cgi?id=123229
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Give a name to GLib timeout sources, this is helpful when
     9        profiling WebKitGTK applications.
     10
     11        No new tests, no change in functionality.
     12
    1132013-10-28  Philippe Normand  <pnormand@igalia.com>
    214
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r158103 r158110  
    451451    if (newState == GST_STATE_READY && !m_readyTimerHandler) {
    452452        m_readyTimerHandler = g_timeout_add_seconds(gReadyStateTimerInterval, reinterpret_cast<GSourceFunc>(mediaPlayerPrivateReadyStateTimeoutCallback), this);
     453        g_source_set_name_by_id(m_readyTimerHandler, "[WebKit] mediaPlayerPrivateReadyStateTimeoutCallback");
    453454    } else if (newState != GST_STATE_READY && m_readyTimerHandler) {
    454455        g_source_remove(m_readyTimerHandler);
  • trunk/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp

    r157506 r158110  
    271271    priv->timeoutId = g_timeout_add_full(G_PRIORITY_DEFAULT, 0, webkitVideoSinkTimeoutCallback,
    272272                                          gst_object_ref(sink), reinterpret_cast<GDestroyNotify>(gst_object_unref));
     273    g_source_set_name_by_id(priv->timeoutId, "[WebKit] webkitVideoSinkTimeoutCallback");
    273274
    274275    g_cond_wait(priv->dataCondition, priv->bufferMutex);
  • trunk/Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.cpp

    r150421 r158110  
    171171
    172172    // Start periodic updates of the progress bar.
    173     if (!m_progressBarUpdateId)
     173    if (!m_progressBarUpdateId) {
    174174        m_progressBarUpdateId = g_timeout_add(PROGRESS_BAR_UPDATE_INTERVAL, reinterpret_cast<GSourceFunc>(progressBarUpdateCallback), this);
     175        g_source_set_name_by_id(m_progressBarUpdateId, "[WebKit] progressBarUpdateCallback");
     176    }
    175177
    176178    // Hide the hud in few seconds, if requested.
    177     if (autoHide)
     179    if (autoHide) {
    178180        m_hudTimeoutId = g_timeout_add(HUD_AUTO_HIDE_INTERVAL, reinterpret_cast<GSourceFunc>(hideHudCallback), this);
     181        g_source_set_name_by_id(m_hudTimeoutId, "[WebKit] hideHudCallback");
     182    }
    179183}
    180184
     
    447451
    448452    m_progressBarUpdateId = g_timeout_add(PROGRESS_BAR_UPDATE_INTERVAL, reinterpret_cast<GSourceFunc>(progressBarUpdateCallback), this);
     453    g_source_set_name_by_id(m_progressBarUpdateId, "[WebKit] progressBarUpdateCallback");
    449454
    450455    playStateChanged();
  • trunk/Source/WebCore/platform/gtk/SharedTimerGtk.cpp

    r101190 r158110  
    4444}
    4545
    46 static gboolean timeout_cb(gpointer)
     46static gboolean sharedTimerTimeoutCallback(gpointer)
    4747{
    4848    if (sharedTimerFiredFunction)
     
    5858
    5959    stopSharedTimer();
    60     sharedTimer = g_timeout_add_full(GDK_PRIORITY_REDRAW, intervalInMS, timeout_cb, 0, 0);
     60    sharedTimer = g_timeout_add_full(GDK_PRIORITY_REDRAW, intervalInMS, sharedTimerTimeoutCallback, 0, 0);
     61    g_source_set_name_by_id(sharedTimer, "[WebKit] sharedTimerTimeoutCallback");
    6162}
    6263
  • trunk/Source/WebCore/plugins/gtk/gtk2xtbin.c

    r152552 r158110  
    394394                      (GSourceFunc)xt_event_polling_timer_callback,
    395395                      xtdisplay);
     396    g_source_set_name_by_id(xt_polling_timer_id, "[WebKit] xt_event_polling_timer_callback");
    396397  }
    397398
  • trunk/Source/WebKit/gtk/ChangeLog

    r158103 r158110  
     12013-10-28  Bastien Nocera <hadess@hadess.net>
     2
     3        Name all the GLib timeout sources
     4        https://bugs.webkit.org/show_bug.cgi?id=123229
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Give a name to GLib timeout sources, this is helpful when
     9        profiling WebKitGTK applications.
     10
    1112013-10-28  Bastien Nocera <hadess@hadess.net>
    212
  • trunk/Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp

    r156543 r158110  
    170170        double nextFlush = std::max((1 / gFramesPerSecond) - (currentTime() - m_lastFlushTime), 0.0);
    171171        m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 1000 * nextFlush, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
     172        g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
    172173    }
    173174
     
    270271
    271272    m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 500, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
     273    g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
    272274}
    273275
     
    337339    double nextFlush = std::max(gScheduleDelay - (currentTime() - m_lastFlushTime), 0.0);
    338340    m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, nextFlush * 1000, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
     341    g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
    339342}
    340343
  • trunk/Source/WebKit2/ChangeLog

    r158108 r158110  
     12013-10-28  Bastien Nocera <hadess@hadess.net>
     2
     3        Name all the GLib timeout sources
     4        https://bugs.webkit.org/show_bug.cgi?id=123229
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Give a name to GLib timeout sources, this is helpful when
     9        profiling WebKitGTK applications.
     10
    1112013-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
    212
  • trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp

    r156603 r158110  
    305305        double nextFlush = std::max((1 / targetFPS) - (currentTime() - m_lastFlushTime), 0.0);
    306306        m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, nextFlush * 1000.0, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
     307        g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
    307308    }
    308309}
     
    403404
    404405    // We use a GLib timer because otherwise GTK+ event handling during dragging can starve WebCore timers, which have a lower priority.
    405     if (!m_layerFlushTimerCallbackId)
     406    if (!m_layerFlushTimerCallbackId) {
    406407        m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 0, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0);
     408        g_source_set_name_by_id(m_layerFlushTimerCallbackId, "[WebKit] layerFlushTimerFiredCallback");
     409    }
    407410}
    408411
  • trunk/Tools/ChangeLog

    r158103 r158110  
     12013-10-28  Bastien Nocera <hadess@hadess.net>
     2
     3        Name all the GLib timeout sources
     4        https://bugs.webkit.org/show_bug.cgi?id=123229
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Give a name to GLib timeout sources, this is helpful when
     9        profiling WebKitGTK applications.
     10
    1112013-10-28  Bastien Nocera <hadess@hadess.net>
    212
  • trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp

    r156331 r158110  
    315315
    316316    m_waitToDump = waitUntilDone;
    317     if (m_waitToDump && shouldSetWaitToDumpWatchdog())
    318         setWaitToDumpWatchdog(g_timeout_add_seconds(timeoutSeconds, waitToDumpWatchdogFired, 0));
     317    if (m_waitToDump && shouldSetWaitToDumpWatchdog()) {
     318        guint id = g_timeout_add_seconds(timeoutSeconds, waitToDumpWatchdogFired, 0);
     319        g_source_set_name_by_id(id, "[WebKit] waitToDumpWatchdogFired");
     320        setWaitToDumpWatchdog(id);
     321    }
    319322}
    320323
  • trunk/Tools/GtkLauncher/main.c

    r155714 r158110  
    158158                                                    "%s is now full screen. Press ESC or f to exit.", uri);
    159159        g_signal_connect_swapped(dialog, "response", G_CALLBACK(gtk_widget_destroy), dialog);
    160         g_timeout_add(1500, (GSourceFunc) webViewFullscreenMessageWindowClose, dialog);
     160        guint id = g_timeout_add(1500, (GSourceFunc) webViewFullscreenMessageWindowClose, dialog);
     161        g_source_set_name_by_id(id, "[WebKit] webViewFullscreenMessageWindowClose");
    161162        gtk_dialog_run(GTK_DIALOG(dialog));
    162163    }
  • trunk/Tools/MiniBrowser/gtk/BrowserWindow.c

    r157218 r158110  
    164164    gdouble progress = webkit_web_view_get_estimated_load_progress(webView);
    165165    gtk_entry_set_progress_fraction(GTK_ENTRY(window->uriEntry), progress);
    166     if (progress == 1.0)
    167         g_timeout_add(500, (GSourceFunc)resetEntryProgress, window->uriEntry);
     166    if (progress == 1.0) {
     167        guint id = g_timeout_add(500, (GSourceFunc)resetEntryProgress, window->uriEntry);
     168        g_source_set_name_by_id(id, "[WebKit] resetEntryProgress");
     169    }
    168170}
    169171
     
    312314
    313315    window->fullScreenMessageLabelId = g_timeout_add_seconds(2, (GSourceFunc)fullScreenMessageTimeoutCallback, window);
     316    g_source_set_name_by_id(window->fullScreenMessageLabelId, "[WebKit] fullScreenMessageTimeoutCallback");
    314317    gtk_widget_hide(window->toolbar);
    315318    window->searchBarVisible = gtk_widget_get_visible(GTK_WIDGET(window->searchBar));
  • trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp

    r140970 r158110  
    6161    m_waitToDumpWatchdogTimer = g_timeout_add(waitToDumpWatchdogTimerInterval * 1000,
    6262                                              waitToDumpWatchdogTimerCallback, 0);
     63    g_source_set_name_by_id(m_waitToDumpWatchdogTimer, "[WebKit] waitToDumpWatchdogTimerCallback");
    6364}
    6465
  • trunk/Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp

    r135496 r158110  
    6969{
    7070    cancelTimeout();
    71     if (timeout != m_noTimeout)
     71    if (timeout != m_noTimeout) {
    7272        gTimeoutSourceId = g_timeout_add(timeout * 1000, timeoutCallback, 0);
     73        g_source_set_name_by_id(gTimeoutSourceId, "[WebKit] timeoutCallback");
     74    }
    7375    gtk_main();
    7476}
Note: See TracChangeset for help on using the changeset viewer.