From 72f07c37f1305f63b093277c17fa0dd1020c3e56 Mon Sep 17 00:00:00 2001 From: Anatolii Nikulin Date: Wed, 30 Nov 2016 17:39:39 +0300 Subject: [PATCH] Enable Web startup profiling Change-Id: I9938acefe6515d23d117ee1e3d71c558abb9438b Signed-off-by: Anatolii Nikulin --- daemon/cpp/features/feature_wsp.cpp | 6 +++--- packaging/swap-manager.spec | 7 +++++-- scripts/gen_wsp_data.sh | 42 +++++++++++++------------------------ 3 files changed, 22 insertions(+), 33 deletions(-) diff --git a/daemon/cpp/features/feature_wsp.cpp b/daemon/cpp/features/feature_wsp.cpp index d06f9a7..c19d9a7 100644 --- a/daemon/cpp/features/feature_wsp.cpp +++ b/daemon/cpp/features/feature_wsp.cpp @@ -38,7 +38,7 @@ static const char path_enabled[] = "/sys/kernel/debug/swap/wsp/enabled"; static const char path_cmd[] = "/sys/kernel/debug/swap/wsp/cmd"; -static const char ewebkit_path[] = "/usr/lib/libewebkit2.so"; +static const char chromium_path[] = "/usr/lib/libchromium-ewk.so"; static std::string rmPlt(const std::string &name) @@ -66,9 +66,9 @@ class FeatureWSP : public Feature if (addr == 0) { FileElf elf; - ret = elf.open(ewebkit_path); + ret = elf.open(chromium_path); if (ret) { - LOGE("cannot open ELF file '%s'\n", ewebkit_path); + LOGE("cannot open ELF file '%s'\n", chromium_path); return ret; } diff --git a/packaging/swap-manager.spec b/packaging/swap-manager.spec index a277ea0..62ee418 100644 --- a/packaging/swap-manager.spec +++ b/packaging/swap-manager.spec @@ -8,7 +8,7 @@ Source: %{name}_%{version}.tar.gz # setup config %define NSP_SUPPORT 0 -%define WSP_SUPPORT 0 +%define WSP_SUPPORT 1 %define WSI_SUPPORT 1 %define WAYLAND_SUPPORT 0 @@ -55,7 +55,6 @@ BuildRequires: pkgconfig(tizen-extension-client) %endif %define NSP_SUPPORT 1 -# FIXME: add WSP_SUPPORT wrt webkit2-efl and webkit2-efl-debuginfo %if %{WSI_SUPPORT} BuildRequires: pkgconfig(chromium-efl) @@ -65,6 +64,10 @@ BuildRequires: chromium-efl-debuginfo BuildRequires: pkgconfig(libwebsockets) %endif +%if %{WSP_SUPPORT} +BuildRequires: crosswalk-tizen +%endif + Requires: swap-modules Requires: swap-probe Requires: swap-probe-elf diff --git a/scripts/gen_wsp_data.sh b/scripts/gen_wsp_data.sh index 01fe413..4a4cb33 100755 --- a/scripts/gen_wsp_data.sh +++ b/scripts/gen_wsp_data.sh @@ -7,17 +7,17 @@ ewebkit_path="/sys/kernel/debug/swap/wsp/ewebkit_path" source $script_dir/dyn_vars if [ "$__tizen_profile_name__" == "tv" ]; then - webkit_package_name=webkit2-efl-tv + chromium_package_name=chromium-efl-tv else - webkit_package_name=webkit2-efl + chromium_package_name=chromium-efl fi -path_libewebkit2=`rpm -ql $webkit_package_name | grep "libewebkit2.so$" | head -1` +path_libchromium=`rpm -ql $chromium_package_name | grep "libchromium-ewk.so$" | head -1` if [ "$__tizen_profile_name__" == "1" ]; then - path_libewebkit2_debuginfo=$path_libewebkit2 + path_libchromium_debuginfo=$path_libchromium else - path_libewebkit2_debuginfo=`rpm -ql ${webkit_package_name}-debuginfo | grep "libewebkit2.so.debug$" | head -1` + path_libchromium_debuginfo=`rpm -ql ${chromium_package_name}-debuginfo | grep "libchromium-ewk.so.debug$" | head -1` fi @@ -36,16 +36,16 @@ get_addrs() len=${#names[@]} if [[ "$param" == "-r" ]]; then - path_lib=$path_libewebkit2 + path_lib=$path_libchromium for (( i=0; i < ${len}; ++i)); do names[$i]=`echo ${names[$i]} | cut -d'@' -f 1` done else - path_lib=$path_libewebkit2_debuginfo + path_lib=$path_libchromium_debuginfo fi - addrs=($(parse_elf $path_lib $param ${names[@]})) + addrs=($(parse_elf ${path_lib} -s ${names[@]})) for (( i=0; i < ${len}; ++i)); do name=${names[$i]} @@ -100,23 +100,9 @@ gen_array() function gen_header_out() { - if [ "$__tizen_profile_name__" == "tv" ] || [ "$__tizen_product_2_4_wearable__" == "1" ]; then - add_func_plt soup_requester_request_uri@plt soup_request - add_func _ZN7WebCore14ResourceLoader15willSendRequestERNS_15ResourceRequestERKNS_16ResourceResponseE main_res_will - add_func _ZN7WebCore11CachedImage7addDataEPKcj main_res_add - add_func _ZN7WebCore14ResourceLoader16didFinishLoadingEd main_res_finish - add_func _ZN7WebCore14ResourceLoader15willSendRequestERNS_15ResourceRequestERKNS_16ResourceResponseE res_will - add_func _ZN7WebCore14ResourceLoader16didFinishLoadingEPNS_14ResourceHandleEd res_finish - add_func _ZN7WebCore22CompositingCoordinator24flushPendingLayerChangesEv redraw - else - add_func_plt soup_requester_request@plt soup_request - add_func _ZN7WebCore18MainResourceLoader15willSendRequestERNS_15ResourceRequestERKNS_16ResourceResponseE main_res_will - add_func _ZN7WebCore18MainResourceLoader7addDataEPKcib main_res_add - add_func _ZN7WebCore18MainResourceLoader16didFinishLoadingEd main_res_finish - add_func _ZN7WebCore14ResourceLoader15willSendRequestERNS_15ResourceRequestERKNS_16ResourceResponseE res_will - add_func _ZN7WebCore14ResourceLoader16didFinishLoadingEPNS_14ResourceHandleEd res_finish - add_func _ZN6WebKit20LayerTreeCoordinator24flushPendingLayerChangesEv redraw - fi + add_func _ZN5blink14ResourceLoader5startEv res_will + add_func _ZN5blink14ResourceLoader16didFinishLoadingEPNS_12WebURLLoaderEdx res_finish + add_func _ZN7content23CompositorOutputSurface11SwapBuffersEPN2cc15CompositorFrameE redraw IFS=$'\n' @@ -155,8 +141,8 @@ EOF function gen_script_out() { - webapp_package_name=wrt - path_webapp=`rpm -ql $webapp_package_name | grep "wrt_launchpad_daemon$" | head -1` + webapp_package_name=crosswalk-tizen + path_webapp=`rpm -ql $webapp_package_name | grep "wrt-loader" | head -1` cat <<- EOF @@ -165,7 +151,7 @@ function gen_script_out() #WSP initialze autogenerated script PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/echo "$path_webapp" > $webapp_path - /bin/echo "$path_libewebkit2" > $ewebkit_path + /bin/echo "$path_libchromium" > $ewebkit_path EOF } -- 2.7.4