parse-events.c (5aa365f29867eb739cde0713f00c7d80f36e0739) parse-events.c (506fde11a35f39e1b44478339c41e94dfd278aa2)
1#include <linux/hw_breakpoint.h>
2#include <linux/err.h>
3#include "util.h"
4#include "../perf.h"
5#include "evlist.h"
6#include "evsel.h"
7#include <subcmd/parse-options.h>
8#include "parse-events.h"

--- 240 unchanged lines hidden (view full) ---

249 }
250
251 path->system = strndup(name, str - name);
252 path->name = strdup(str+1);
253
254 if (path->system == NULL || path->name == NULL) {
255 zfree(&path->system);
256 zfree(&path->name);
1#include <linux/hw_breakpoint.h>
2#include <linux/err.h>
3#include "util.h"
4#include "../perf.h"
5#include "evlist.h"
6#include "evsel.h"
7#include <subcmd/parse-options.h>
8#include "parse-events.h"

--- 240 unchanged lines hidden (view full) ---

249 }
250
251 path->system = strndup(name, str - name);
252 path->name = strdup(str+1);
253
254 if (path->system == NULL || path->name == NULL) {
255 zfree(&path->system);
256 zfree(&path->name);
257 free(path);
258 path = NULL;
257 zfree(&path);
259 }
260
261 return path;
262}
263
264const char *event_type(int type)
265{
266 switch (type) {

--- 1210 unchanged lines hidden (view full) ---

1477 if (perf_pmu_events_list_num > 0) {
1478 struct perf_pmu_event_symbol *p;
1479 int i;
1480
1481 for (i = 0; i < perf_pmu_events_list_num; i++) {
1482 p = perf_pmu_events_list + i;
1483 free(p->symbol);
1484 }
258 }
259
260 return path;
261}
262
263const char *event_type(int type)
264{
265 switch (type) {

--- 1210 unchanged lines hidden (view full) ---

1476 if (perf_pmu_events_list_num > 0) {
1477 struct perf_pmu_event_symbol *p;
1478 int i;
1479
1480 for (i = 0; i < perf_pmu_events_list_num; i++) {
1481 p = perf_pmu_events_list + i;
1482 free(p->symbol);
1483 }
1485 free(perf_pmu_events_list);
1486 perf_pmu_events_list = NULL;
1484 zfree(&perf_pmu_events_list);
1487 perf_pmu_events_list_num = 0;
1488 }
1489}
1490
1491#define SET_SYMBOL(str, stype) \
1492do { \
1493 p->symbol = str; \
1494 if (!p->symbol) \

--- 1007 unchanged lines hidden ---
1485 perf_pmu_events_list_num = 0;
1486 }
1487}
1488
1489#define SET_SYMBOL(str, stype) \
1490do { \
1491 p->symbol = str; \
1492 if (!p->symbol) \

--- 1007 unchanged lines hidden ---