Fix and refactor protocol documentation 12/161812/3
authorAnastasia Lyupa <a.lyupa@samsung.com>
Mon, 27 Nov 2017 09:34:01 +0000 (12:34 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Tue, 28 Nov 2017 08:42:51 +0000 (08:42 +0000)
- created types table,
  used it in args and return descriptions.
- added GEM, 3D memory to MSG_SYSTEM
- fixed MSG_LSAN
- fixed MSG_WEB_APP_SETUP_STAGE
- added sockets info to MSG_PROCESS_STATUS_INFO

Change-Id: I65f57cb8a08e7a0ca7160c1ea60c4d51eb895b53
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
docs/protocol.rst

index a9ecf2f96b394a7cbfebf82df0440a816b75bf12..51de4f5178085ab267c5750d5e15e83047e86d50 100644 (file)
@@ -81,6 +81,36 @@ Control message list
 | MSG\_GET\_REALPATH              | 0x0020 | file path               | string    | file path string                                                                                                  |
 +---------------------------------+--------+-------------------------+-----------+-------------------------------------------------------------------------------------------------------------------+
 
+.. _types:
+
+Types
+-----
+
++----------+----------+------------------+------------------+
+| name     | code     | type             | size in bytes    |
++==========+==========+==================+==================+
+| char     | c        | uint8            | 1                |
++----------+----------+------------------+------------------+
+| int      | d        | uint32           | 4                |
++----------+----------+------------------+------------------+
+| long     | x        | uint64           | 8                |
++----------+----------+------------------+------------------+
+| pointer  | p        | uint64           | 8                |
++----------+----------+------------------+------------------+
+| float    | f        | float            | 4                |
++----------+----------+------------------+------------------+
+| double   | w        | double           | 8                |
++----------+----------+------------------+------------------+
+| bool     | b        | uint8            | 1                |
++----------+----------+------------------+------------------+
+| void     | v        | no value         | 0                |
++----------+----------+------------------+------------------+
+| none     | n        | no value         | 0                |
++----------+----------+------------------+------------------+
+| string   | s        | "\\0" terminated | variable         |
+|          |          | string           |                  |
++----------+----------+------------------+------------------+
+
 .. _app_inst:
 
 ApplicationInst
@@ -137,14 +167,13 @@ FunctionInst
 Common probe
 ^^^^^^^^^^^^
 
-+----------+----------+-----------------+-------------------------------------------------------------------------------------------------------------+
-| name     | type     | value           | description                                                                                                 |
-+==========+==========+=================+=============================================================================================================+
-| args     | string   | array of types  | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool) + end "\\0"  |
-+----------+----------+-----------------+-------------------------------------------------------------------------------------------------------------+
-| return   | char     | return type     | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string)   |
-|          |          |                 | v(1, void), n(1,no type)                                                                                    |
-+----------+----------+-----------------+-------------------------------------------------------------------------------------------------------------+
++----------+----------+-----------------+-----------------------------------------------------+
+| name     | type     | value           | description                                         |
++==========+==========+=================+=====================================================+
+| args     | string   | array of types  | string of type codes: see :ref:`types` + end "\\0"  |
++----------+----------+-----------------+-----------------------------------------------------+
+| return   | char     | return type     | type code: see :ref:`types` + end "\\0"             |
++----------+----------+-----------------+-----------------------------------------------------+
 
 .. _fbi_probe:
 
@@ -730,7 +759,7 @@ Process profiling
 ^^^^^^^^^^^^^^^^^
 
 +------------------+--------+-----------------------+-------------------------------------------------+
-| name             | type   | value                  description                                      |
+| name             | type   | value                 | description                                     |
 +==================+========+=======================+=================================================+
 | PID              | uint32 | pid                   | process id                                      |
 +------------------+--------+-----------------------+-------------------------------------------------+
@@ -745,6 +774,11 @@ Process profiling
 | PSS memory       | uint64 | size                  | amount of RAM mapped into the process weighted  |
 |                  |        |                       | by the amount it is shared across processes     |
 +------------------+--------+-----------------------+-------------------------------------------------+
+| GEM memory       | uint64 | size                  | sum of graphics execution manager memory        |
+|                  |        |                       | in bytes                                        |
++------------------+--------+-----------------------+-------------------------------------------------+
+| 3D memory        | uint64 | size                  | allocated by GPU driver memory size in bytes    |
++------------------+--------+-----------------------+-------------------------------------------------+
 | total alloc size | uint64 | size                  | allocated memory size in bytes                  |
 +------------------+--------+-----------------------+-------------------------------------------------+
 | count of threads | uint32 | any number            | count of elements in thread load array          |
@@ -792,6 +826,11 @@ MSG\_PROCESS\_STATUS\_INFO
 +--------------------+----------+------------------+------------------------------------------------------------------------+
 | opened files list  | array    | array of objects | see :ref:`opened_files`                                                |
 +--------------------+----------+------------------+------------------------------------------------------------------------+
+| opened sockets     | uint32   | any number       | count of elements in opened sockets array                              |
+| count              |          |                  | (0 if file option is disabled)                                         |
++--------------------+----------+------------------+------------------------------------------------------------------------+
+| opened sockets list| array    | array of objects | see :ref:`opened_sockets`                                              |
++--------------------+----------+------------------+------------------------------------------------------------------------+
 
 .. _opened_files:
 
@@ -810,6 +849,21 @@ Opened files
 | file path | string | path     | file path on target |
 +-----------+--------+----------+---------------------+
 
+.. _opened_sockets:
+
+Opened sockets
+^^^^^^^^^^^^^^
+
++-----------+--------+----------+---------------------+
+| name      | type   | value    | description         |
++===========+========+==========+=====================+
+| FD        | uint32 | fd       | file descriptor     |
++-----------+--------+----------+---------------------+
+| ip        | uint64 | ip       | ip address          |
++-----------+--------+----------+---------------------+
+| port      | string | variable | port string         |
++-----------+--------+----------+---------------------+
+
 .. _msg_terminate:
 
 MSG\_TERMINATE
@@ -867,9 +921,8 @@ MSG\_FUNCTION\_ENTRY
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 | count of args       | uint32     | any number | counts of args (type + value pairs)                                                                                      |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
-| args                | string     | array of   | arg: type (char) + corresponding value                                                                                   |
-|                     |            |            | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string end with "\\0") |
-|                     |            | args       | 04 (FILE) : dentry + fd + file path                                                                                      |
+| args                | string     | array of   | arg: type (char) + corresponding value, see :ref:`types` + end "\\0"                                                     |
+|                     |            | args       |                                                                                                                          |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 
 .. _msg_function_exit:
@@ -890,8 +943,7 @@ MSG\_FUNCTION\_EXIT
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 | CPU num             | uint32     | number     | on which CPU the function was executed                                                                                   |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
-| return              | string     | arg        | arg: type (char) + corresponding value                                                                                   |
-|                     |            |            | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string end with "\\0") |
+| return              | string     | arg        | arg: type (char) + corresponding value, see :ref:`types` + end "\\0"                                                     |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 
 .. _msg_syscall_entry:
@@ -916,9 +968,8 @@ MSG\_SYSCALL\_ENTRY
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 | count of args       | uint32     | any number | counts of args (type + value pairs)                                                                                      |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
-| args                | string     | array of   | arg: type (char) + corresponding value                                                                                   |
-|                     |            |            | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string end with "\\0") |
-|                     |            | args       | 04 (FILE) : dentry + fd + file path                                                                                      |
+| args                | string     | array of   | arg: type (char) + corresponding value, see :ref:`types` + end "\\0"                                                     |
+|                     |            | args       |                                                                                                                          |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 
 .. _msg_syscall_exit:
@@ -941,8 +992,7 @@ MSG\_SYSCALL\_EXIT
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 | CPU num             | uint32     | number     | on which CPU the function was executed                                                                                   |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
-| return              | string     | arg        | arg: type (char) + corresponding value                                                                                   |
-|                     |            |            | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string end with "\\0") |
+| return              | string     | arg        | arg: type (char) + corresponding value, see :ref:`types` + end "\\0"                                                     |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 
 .. _msg_file_func_entry:
@@ -1010,8 +1060,7 @@ MSG\_FILE\_FUNCTION\_EXIT
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 | TID                 | uint32     | tid        | thread id                                                                                                                |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
-| return              | string     | arg        | arg: type (char) + corresponding value                                                                                   |
-|                     |            |            | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string end with "\\0") |
+| return              | string     | arg        | arg: type (char) + corresponding value, see :ref:`types` + end "\\0"                                                     |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 
 .. _msg_context_switch:
@@ -1081,11 +1130,10 @@ See `Probe log` for details of each probe message.
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 | count of args       | uint32     | any number | counts of args (type + value pairs)                                                                                      |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
-| args                | string     | array of   | arg: type (char) + corresponding value                                                                                   |
-|                     |            | args       | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string end with "\\0") |
+| args                | string     | array of   | arg: type (char) + corresponding value, see :ref:`types` + end "\\0"                                                     |
+|                     |            | args       |                                                                                                                          |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
-| return              | string     | arg        | arg: type (char) + corresponding value                                                                                   |
-|                     |            |            | type: c (1, char), d(4, int), x(8, long), p(8, pointer), f(4, float), w(8, double), b(1, bool), s(string end with "\\0") |
+| return              | string     | arg        | arg: type (char) + corresponding value, see :ref:`types` + end "\\0"                                                     |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
 | errno               | uint64     | number     | error number                                                                                                             |
 +---------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------+
@@ -1128,7 +1176,7 @@ MSG\_APP\_SETUP\_STAGE
 +=============+=========+========+======================================================================================+
 | PID         | uint32  | pid    | process id                                                                           |
 +-------------+---------+--------+--------------------------------------------------------------------------------------+
-| stage ID    | uint32  | number | | 0x00 - library mapping : stage when linker maps application and dependencies       |
+| stage id    | uint32  | number | | 0x00 - library mapping : stage when linker maps application and dependencies       |
 |             |         |        | | 0x01 - main : executing application main from the beginning to app\_efl\_main call |
 |             |         |        | | 0x02 - create : executing app\_create\_cb from app\_event\_callback\_s             |
 |             |         |        | | 0x03 - service : executing app\_service\_cb from app\_event\_callback\_s           |
@@ -1156,10 +1204,10 @@ MSG\_WEB\_APP\_SETUP\_STAGE
 |             |         |        | | 0x0005 - WSP\_DRAW\_BEGIN,                                                         |
 |             |         |        | | 0x0006 - WSP\_DRAW\_END                                                            |
 +-------------+---------+--------+--------------------------------------------------------------------------------------+
-| res id      | uint32  | number | resource id if wsp id = 1-4, otherwise there is nothing                              |
-+-------------+---------+--------+--------------------------------------------------------------------------------------+
 | path        | string  | path   | resource path if wsp id = 1, otherwise there is nothing                              |
 +-------------+---------+--------+--------------------------------------------------------------------------------------+
+| res id      | uint32  | number | resource id if wsp id = 1-4, otherwise there is nothing                              |
++-------------+---------+--------+--------------------------------------------------------------------------------------+
 
 .. _msg_lsan:
 
@@ -1176,7 +1224,7 @@ MSG\_LSAN
 +------------------+--------+---------+--------------------------------------------------------------------------------------------------+
 | pid              | uint32 | pid     | process id                                                                                       |
 +------------------+--------+---------+--------------------------------------------------------------------------------------------------+
-| message          | string | variable| if status = 2: LSan report file name, else: arbitrary valid string                               |
+| arg string       | string | arg     | arg: "s" + string + end "\\0", some message                                                      |
 +------------------+--------+---------+--------------------------------------------------------------------------------------------------+
 | call type ptr    | uint32 | 0       | used by SWAP internally, it is always 0                                                          |
 +------------------+--------+---------+--------------------------------------------------------------------------------------------------+
@@ -1902,8 +1950,10 @@ Size limits in swap manager
 | US\_APP\_INST\_LIB\_MAX     | 1000                  |
 +-----------------------------+-----------------------+
 
-HV Properties
-=============
+UIHV Properties
+===============
+
+Description of user interface hierarchy viewer properties.
 
 Category specific properties
 ----------------------------