From: Anastasia Lyupa Date: Wed, 25 Sep 2013 11:48:14 +0000 (+0400) Subject: [PROTO] GL: add library init event packing X-Git-Tag: Tizen_SDK_2.3~136 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c33a555a26f09778ef8477088de2bbd34ae97c17;p=platform%2Fcore%2Fsystem%2Fswap-probe.git [PROTO] GL: add library init event packing da-probe: commit 27ba48118bdf41875b3b257d061c5d6b5be0a401 Change-Id: I753b53c4b0887943945173ed19b001df9dd378e4 Signed-off-by: Anastasia Lyupa --- diff --git a/probe_graphics/da_gles20.h b/probe_graphics/da_gles20.h index 4e0f8ee..3d80339 100644 --- a/probe_graphics/da_gles20.h +++ b/probe_graphics/da_gles20.h @@ -61,7 +61,7 @@ char contextValue[256]; static methodType FUNCNAME ## p = 0; \ void* tmpPtr = 0; \ int32_t vAPI_ID = API_ID_ ## FUNCNAME; \ - uint64_t start_nsec = get_current_nsec(); \ + uint64_t start_nsec = get_current_nsec(); \ if(!FUNCNAME##p) { \ probeBlockStart(); \ if (lib_handle[LIBGLES20] == ((void *) 0)) { \ @@ -73,17 +73,28 @@ char contextValue[256]; perror(perror_msg); \ exit(0); \ } \ + probeInfo_t tempProbeInfo; \ + setProbePoint(&tempProbeInfo); \ + /* get max value */ \ + char maxValString[64]; \ + GLint maxVal[2]; \ + glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVal[0]); \ + glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxVal[1]); \ + sprintf(maxValString, "%d,%d", maxVal[0], maxVal[1]); \ + PREPARE_LOCAL_BUF(); \ + PACK_COMMON_BEGIN(MSG_PROBE_GL, vAPI_ID, "", 0); \ + PACK_COMMON_END(1, 0, 0); \ + PACK_GL_ADD(APITYPE_INIT, 0, maxValString); \ + FLUSH_LOCAL_BUF(); \ } \ \ - /* TODO: add library init event here */ \ - \ - tmpPtr = dlsym(lib_handle[LIBGLES20], #FUNCNAME); \ + tmpPtr = dlsym(lib_handle[LIBGLES20], #FUNCNAME); \ if (tmpPtr == NULL || dlerror() != NULL) { \ - perror("dlsym failed : " #FUNCNAME); \ + perror("dlsym failed : " #FUNCNAME); \ exit(0); \ } \ \ - memcpy(&FUNCNAME##p, &tmpPtr, sizeof(tmpPtr)); \ + memcpy(&FUNCNAME##p, &tmpPtr, sizeof(tmpPtr)); \ probeBlockEnd(); \ } \ PRE_PROBEBLOCK()