Lines Matching refs:event
78 static int HiviewHieventConvertString(struct HiviewHievent *event, char **pbuf);
155 struct HiviewHievent *event = NULL; in HiviewHieventCreate() local
158 event = LOS_MemAlloc((VOID *)OS_SYS_MEM_ADDR, sizeof(*event)); in HiviewHieventCreate()
159 if (!event) { in HiviewHieventCreate()
163 (VOID)memset_s(event, sizeof(*event), 0, sizeof(*event)); in HiviewHieventCreate()
164 event->eventid = eventid; in HiviewHieventCreate()
167 return (void *)event; in HiviewHieventCreate()
170 int HiviewHieventPutIntegral(struct HiviewHievent *event, in HiviewHieventPutIntegral() argument
176 if ((!event) || (!key)) { in HiviewHieventPutIntegral()
181 payload = HiviewHieventGetPayload(event->head, key); in HiviewHieventPutIntegral()
188 HiviewHieventAddPayload(event, payload); in HiviewHieventPutIntegral()
209 int HiviewHieventPutString(struct HiviewHievent *event, in HiviewHieventPutString() argument
215 if ((!event) || (!key) || (!value)) { in HiviewHieventPutString()
220 payload = HiviewHieventGetPayload(event->head, key); in HiviewHieventPutString()
227 HiviewHieventAddPayload(event, payload); in HiviewHieventPutString()
251 int HiviewHieventSetTime(struct HiviewHievent *event, long long seconds) in HiviewHieventSetTime() argument
253 if ((!event) || (seconds == 0)) { in HiviewHieventSetTime()
257 event->time = seconds; in HiviewHieventSetTime()
294 int HiviewHieventAddFilePath(struct HiviewHievent *event, const char *path) in HiviewHieventAddFilePath() argument
296 if (!event) { in HiviewHieventAddFilePath()
300 return AppendArrayItem(event->filePath, MAX_PATH_NUMBER, path); in HiviewHieventAddFilePath()
384 static int HiviewHieventFillPayload(struct HiviewHievent *event, char **pbuf, in HiviewHieventFillPayload() argument
387 struct HiviewHieventPayload *p = event->head; in HiviewHieventFillPayload()
430 static int HiviewHieventConvertString(struct HiviewHievent *event, char **pbuf) in HiviewHieventConvertString() argument
447 tmplen = snprintf_s(tmp, len, len - 1, "eventid %d", event->eventid); in HiviewHieventConvertString()
452 if (!event->filePath[i]) { in HiviewHieventConvertString()
456 event->filePath[i]); in HiviewHieventConvertString()
461 if (event->time) { in HiviewHieventConvertString()
462 tmplen = snprintf_s(tmp, len, len - 1, " -t %lld", event->time); in HiviewHieventConvertString()
467 len = HiviewHieventFillPayload(event, pbuf, tmp, len); in HiviewHieventConvertString()
523 void HiviewHieventDestroy(struct HiviewHievent *event) in HiviewHieventDestroy() argument
528 if (!event) { in HiviewHieventDestroy()
531 p = event->head; in HiviewHieventDestroy()
538 event->head = NULL; in HiviewHieventDestroy()
540 LOS_MemFree((VOID *)OS_SYS_MEM_ADDR, event->filePath[i]); in HiviewHieventDestroy()
541 event->filePath[i] = NULL; in HiviewHieventDestroy()
543 LOS_MemFree((VOID *)OS_SYS_MEM_ADDR, event); in HiviewHieventDestroy()