[FIX/PROFILE] Fix profile data alignment shared with driver
authorDongju Chae <dongju.chae@samsung.com>
Wed, 26 May 2021 06:24:39 +0000 (15:24 +0900)
committer채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 <dongju.chae@samsung.com>
Wed, 26 May 2021 08:00:31 +0000 (17:00 +0900)
This patch fixes profile data alignment shared with driver.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
include/common/typedef.h

index 140b1e0..77d50c9 100644 (file)
@@ -364,13 +364,13 @@ typedef struct {
         /* layer-level profiling specific info. */
         struct {
           int32_t node_id; /**< node id ('-1' means unclassified node) */
-        };
+        } __attribute__ ((packed, aligned));
         /* vISA-level profiling specific info. */
         struct {
           uint32_t visa_opcode;  /**< viSA opcode */
           int64_t visa_prog_seq; /**< vISA program sequence */
           int64_t visa_exec_seq; /**< vISA execution sequence (global) */
-        };
+        } __attribute__ ((packed, aligned));
       };
       /** TODO: Add more info */
     } __attribute__ ((packed, aligned));