parse-events.c (0aea30a07ec6b50de0fc5f5b2ec34a68ead86b61) | parse-events.c (b03b89b350034f220cc24fc77c56990a97a796b2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/hw_breakpoint.h> 3#include <linux/err.h> 4#include <linux/zalloc.h> 5#include <dirent.h> 6#include <errno.h> 7#include <sys/ioctl.h> 8#include <sys/types.h> --- 388 unchanged lines hidden (view full) --- 397 398 evsel = __add_event(list, idx, &attr, /*init_attr=*/true, /*name=*/NULL, 399 /*metric_id=*/NULL, /*pmu=*/NULL, 400 /*config_terms=*/NULL, /*auto_merge_stats=*/false, 401 /*cpu_list=*/"0"); 402 if (!evsel) 403 return -ENOMEM; 404 evsel->tool_event = tool_event; | 1// SPDX-License-Identifier: GPL-2.0 2#include <linux/hw_breakpoint.h> 3#include <linux/err.h> 4#include <linux/zalloc.h> 5#include <dirent.h> 6#include <errno.h> 7#include <sys/ioctl.h> 8#include <sys/types.h> --- 388 unchanged lines hidden (view full) --- 397 398 evsel = __add_event(list, idx, &attr, /*init_attr=*/true, /*name=*/NULL, 399 /*metric_id=*/NULL, /*pmu=*/NULL, 400 /*config_terms=*/NULL, /*auto_merge_stats=*/false, 401 /*cpu_list=*/"0"); 402 if (!evsel) 403 return -ENOMEM; 404 evsel->tool_event = tool_event; |
405 if (tool_event == PERF_TOOL_DURATION_TIME) { | 405 if (tool_event == PERF_TOOL_DURATION_TIME 406 || tool_event == PERF_TOOL_USER_TIME 407 || tool_event == PERF_TOOL_SYSTEM_TIME) { |
406 free((char *)evsel->unit); 407 evsel->unit = strdup("ns"); 408 } 409 return 0; 410} 411 412static int parse_aliases(char *str, const char *names[][EVSEL__MAX_ALIASES], int size) 413{ --- 3047 unchanged lines hidden --- | 408 free((char *)evsel->unit); 409 evsel->unit = strdup("ns"); 410 } 411 return 0; 412} 413 414static int parse_aliases(char *str, const char *names[][EVSEL__MAX_ALIASES], int size) 415{ --- 3047 unchanged lines hidden --- |