diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2017-07-12 14:36:11 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2017-07-12 14:39:00 +0900 |
commit | c34e2f934cd0cca362e7fbe1a85a2f21e7056464 (patch) | |
tree | d2a5566dcf9b68394ebd60f63e2c230477ef734f | |
parent | 708b3398528a7de3b2d8b3b2f655c54e00d990c5 (diff) | |
download | libsoup-submit/tizen/20170721.063811.tar.gz libsoup-submit/tizen/20170721.063811.tar.bz2 libsoup-submit/tizen/20170721.063811.zip |
Add dlog messagesubmit/tizen/20170721.063811submit/tizen/20170721.063342submit/tizen/20170717.234028accepted/tizen/unified/20170724.020259
Change-Id: Ia7069de1ce5960c3636495acdf674ab97e6beaa0
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rwxr-xr-x | libsoup/TIZEN.h | 9 | ||||
-rwxr-xr-x | libsoup/soup-connection.c | 23 | ||||
-rw-r--r-- | libsoup/soup-message-io.c | 42 | ||||
-rwxr-xr-x | libsoup/soup-message.c | 23 | ||||
-rwxr-xr-x | libsoup/soup-session.c | 7 | ||||
-rwxr-xr-x | libsoup/soup-socket.c | 10 |
6 files changed, 53 insertions, 61 deletions
diff --git a/libsoup/TIZEN.h b/libsoup/TIZEN.h index c90373be..9092d753 100755 --- a/libsoup/TIZEN.h +++ b/libsoup/TIZEN.h @@ -46,9 +46,16 @@ #define TIZEN_SECURE_LOGI(fmt, args...) #define TIZEN_SECURE_LOGW(fmt, args...) #define TIZEN_SECURE_LOGE(fmt, args...) - #endif // ENABLE(TIZEN_DLOG) +#if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) +#include <sys/prctl.h> +#include <stdio.h> +#ifndef PR_TASK_PERF_USER_TRACE +#define PR_TASK_PERF_USER_TRACE 666 +#endif +#endif // ENABLE(TIZEN_PERFORMANCE_TEST_LOG) + #endif //#ifndef TIZEN_H diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index f1ca752a..45aab8f3 100755 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -17,12 +17,7 @@ #include "TIZEN.h" #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) -#include <sys/prctl.h> -#ifndef PR_TASK_PERF_USER_TRACE -#define PR_TASK_PERF_USER_TRACE 666 -#endif #define MAX_STRING_LEN 512 - static void prctl_with_url(const char *prestr, const char *url) { char s[MAX_STRING_LEN] = ""; @@ -42,12 +37,6 @@ static void prctl_with_url(const char *prestr, const char *url) } prctl(PR_TASK_PERF_USER_TRACE, s, strlen(s)); } - -static void prctl_with_url_and_free(const char *prestr, char *url) -{ - prctl_with_url(prestr, url); - g_free(url); -} #endif typedef struct { @@ -910,6 +899,9 @@ start_ssl_completed (GObject *object, GAsyncResult *result, gpointer user_data) SoupConnection *conn = g_task_get_source_object (task); SoupConnectionPrivate *priv = SOUP_CONNECTION_GET_PRIVATE (conn); GError *error = NULL; +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) + char *uri = NULL; +#endif if (priv->async_context && !priv->use_thread_context) g_main_context_pop_thread_default (priv->async_context); @@ -918,8 +910,15 @@ start_ssl_completed (GObject *object, GAsyncResult *result, gpointer user_data) soup_connection_event (conn, G_SOCKET_CLIENT_TLS_HANDSHAKED, NULL); soup_connection_event (conn, G_SOCKET_CLIENT_COMPLETE, NULL); g_task_return_boolean (task, TRUE); +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) + uri = soup_uri_to_string(soup_connection_get_remote_uri(conn), FALSE); +#if ENABLE(TIZEN_DLOG) + TIZEN_LOGD("[EVT] soup handshake complete : ", uri); +#endif #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) - prctl_with_url_and_free("[EVT] soup handshake complete : ", soup_uri_to_string(soup_connection_get_remote_uri(conn), FALSE)); + prctl_with_url("[EVT] soup handshake complete : ", uri); +#endif + g_free(uri); #endif } else g_task_return_error (task, error); diff --git a/libsoup/soup-message-io.c b/libsoup/soup-message-io.c index 28b37126..2c42451f 100644 --- a/libsoup/soup-message-io.c +++ b/libsoup/soup-message-io.c @@ -25,14 +25,7 @@ #include "TIZEN.h" #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) -#include <sys/prctl.h> -#include <stdio.h> -#ifndef PR_TASK_PERF_USER_TRACE -#define PR_TASK_PERF_USER_TRACE 666 -#endif - #define MAX_STRING_LEN 512 - static void prctl_with_url(const char *prestr, const char *url) { char s[MAX_STRING_LEN] = ""; @@ -52,12 +45,6 @@ static void prctl_with_url(const char *prestr, const char *url) } prctl(PR_TASK_PERF_USER_TRACE, s, strlen(s)); } - -static void prctl_with_url_and_free(const char *prestr, char *url) -{ - prctl_with_url(prestr, url); - g_free(url); -} #endif typedef enum { @@ -356,7 +343,7 @@ io_write (SoupMessage *msg, gboolean blocking, SoupMessageIOData *io = priv->io_data; SoupBuffer *chunk; gssize nwrote; -#if ENABLE(TIZEN_DLOG) +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) char *uri = NULL; #endif @@ -368,9 +355,11 @@ io_write (SoupMessage *msg, gboolean blocking, io->header_data); } -#if ENABLE(TIZEN_DLOG) +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE); - TIZEN_LOGI("Request URL: %s", uri); +#if ENABLE(TIZEN_DLOG) + TIZEN_LOGI("[BGN] soup_io_w : %s", uri); +#endif #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) prctl_with_url("[BGN] soup_io_w : ", uri); #endif @@ -554,7 +543,7 @@ io_read (SoupMessage *msg, gboolean blocking, gssize nread; SoupBuffer *buffer; guint status; -#if ENABLE(TIZEN_DLOG) +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) char *uri = NULL; #endif @@ -569,13 +558,17 @@ io_read (SoupMessage *msg, gboolean blocking, io->header_data, error); g_byte_array_set_size (io->read_header_buf, 0); -#if ENABLE(TIZEN_DLOG) + +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE); - TIZEN_LOGI("Response URL: %s", uri); +#if ENABLE(TIZEN_DLOG) + TIZEN_LOGI("[BGN] soup_io_r_hdr : %s", uri); +#endif #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) prctl_with_url("[BGN] soup_io_r_hdr : ", uri); #endif g_free(uri); + uri = NULL; #endif if (status != SOUP_STATUS_OK) { @@ -590,8 +583,17 @@ io_read (SoupMessage *msg, gboolean blocking, soup_message_headers_append (msg->request_headers, "Connection", "close"); io->read_state = SOUP_MESSAGE_IO_STATE_FINISHING; +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) + uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE); +#if ENABLE(TIZEN_DLOG) + TIZEN_LOGI("[END] soup_io_r_hdr,not ok : %s, status: %d", uri, status); +#endif #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) - prctl_with_url_and_free("[END] soup_io_r_hdr,not ok : ",soup_uri_to_string(soup_message_get_uri(msg), FALSE)); + prctl_with_url("[END] soup_io_r_hdr,not ok : ", + soup_uri_to_string(soup_message_get_uri(msg), FALSE)); +#endif + g_free(uri); + uri = NULL; #endif break; } diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c index ea5c5193..e3111556 100755 --- a/libsoup/soup-message.c +++ b/libsoup/soup-message.c @@ -17,13 +17,7 @@ #include "TIZEN.h" #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) -#include <sys/prctl.h> -#ifndef PR_TASK_PERF_USER_TRACE -#define PR_TASK_PERF_USER_TRACE 666 -#endif - #define MAX_STRING_LEN 512 - static void prctl_with_url(const char *prestr, const char *url) { char s[MAX_STRING_LEN] = ""; @@ -43,12 +37,6 @@ static void prctl_with_url(const char *prestr, const char *url) } prctl(PR_TASK_PERF_USER_TRACE, s, strlen(s)); } - -static void prctl_with_url_and_free(const char *prestr, char *url) -{ - prctl_with_url(prestr, url); - g_free(url); -} #endif /** @@ -1231,8 +1219,15 @@ soup_message_restarted (SoupMessage *msg) void soup_message_finished (SoupMessage *msg) { +#if ENABLE(TIZEN_DLOG) || ENABLE(TIZEN_PERFORMANCE_TEST_LOG) + char *uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE); +#if ENABLE(TIZEN_DLOG) + TIZEN_LOGI("[EVT] soup_msg_fin : %s", uri); +#endif #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) - prctl_with_url_and_free("[EVT] soup_msg_fin : ", soup_uri_to_string(soup_message_get_uri(msg), FALSE)); + prctl_with_url("[EVT] soup_msg_fin : ", uri); +#endif + g_free(uri); #endif g_signal_emit (msg, signals[FINISHED], 0); } @@ -1240,7 +1235,7 @@ soup_message_finished (SoupMessage *msg) void soup_message_network_event (SoupMessage *msg, GSocketClientEvent event, - GIOStream *connection) + GIOStream *connection) { g_signal_emit (msg, signals[NETWORK_EVENT], 0, event, connection); diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c index 5c141ea3..3d9c3a6c 100755 --- a/libsoup/soup-session.c +++ b/libsoup/soup-session.c @@ -24,14 +24,7 @@ #include "TIZEN.h" #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) -#include <sys/prctl.h> -#ifndef PR_TASK_PERF_USER_TRACE -#define PR_TASK_PERF_USER_TRACE 666 -#endif - #define MAX_STRING_LEN 512 -#define HWCLOCK_LOG(s) {const char *str=s; prctl(PR_TASK_PERF_USER_TRACE, str, strlen(str));} - static void prctl_with_url(const char *prestr, const char *url) { char s[MAX_STRING_LEN] = ""; diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c index f1b5deab..52d88dc2 100755 --- a/libsoup/soup-socket.c +++ b/libsoup/soup-socket.c @@ -21,14 +21,7 @@ #include "TIZEN.h" #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) -#include <sys/prctl.h> -#ifndef PR_TASK_PERF_USER_TRACE -#define PR_TASK_PERF_USER_TRACE 666 -#endif - #define MAX_STRING_LEN 512 -#define HWCLOCK_LOG(s) {const char *str=s; prctl(PR_TASK_PERF_USER_TRACE, str, strlen(str));} - static void prctl_with_url(const char *prestr, const char *url) { char s[MAX_STRING_LEN] = ""; @@ -1518,6 +1511,9 @@ soup_socket_handshake_async (SoupSocket *sock, GTask *task; GError *error = NULL; +#if ENABLE(TIZEN_DLOG) + TIZEN_LOGI("[EVT] soup handshake start : %s", soup_address_get_name(priv->remote_addr)); +#endif #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG) prctl_with_url("[EVT] soup handshake start : ", soup_address_get_name(priv->remote_addr)); #endif |