Lines Matching refs:orig
404 struct perf_cpu_map *perf_cpu_map__merge(struct perf_cpu_map *orig, in perf_cpu_map__merge() argument
412 if (perf_cpu_map__is_subset(orig, other)) in perf_cpu_map__merge()
413 return orig; in perf_cpu_map__merge()
414 if (perf_cpu_map__is_subset(other, orig)) { in perf_cpu_map__merge()
415 perf_cpu_map__put(orig); in perf_cpu_map__merge()
419 tmp_len = __perf_cpu_map__nr(orig) + __perf_cpu_map__nr(other); in perf_cpu_map__merge()
426 while (i < __perf_cpu_map__nr(orig) && j < __perf_cpu_map__nr(other)) { in perf_cpu_map__merge()
427 if (__perf_cpu_map__cpu(orig, i).cpu <= __perf_cpu_map__cpu(other, j).cpu) { in perf_cpu_map__merge()
428 if (__perf_cpu_map__cpu(orig, i).cpu == __perf_cpu_map__cpu(other, j).cpu) in perf_cpu_map__merge()
430 tmp_cpus[k++] = __perf_cpu_map__cpu(orig, i++); in perf_cpu_map__merge()
435 while (i < __perf_cpu_map__nr(orig)) in perf_cpu_map__merge()
436 tmp_cpus[k++] = __perf_cpu_map__cpu(orig, i++); in perf_cpu_map__merge()
444 perf_cpu_map__put(orig); in perf_cpu_map__merge()
448 struct perf_cpu_map *perf_cpu_map__intersect(struct perf_cpu_map *orig, in perf_cpu_map__intersect() argument
456 if (perf_cpu_map__is_subset(other, orig)) in perf_cpu_map__intersect()
457 return perf_cpu_map__get(orig); in perf_cpu_map__intersect()
458 if (perf_cpu_map__is_subset(orig, other)) in perf_cpu_map__intersect()
461 tmp_len = max(__perf_cpu_map__nr(orig), __perf_cpu_map__nr(other)); in perf_cpu_map__intersect()
467 while (i < __perf_cpu_map__nr(orig) && j < __perf_cpu_map__nr(other)) { in perf_cpu_map__intersect()
468 if (__perf_cpu_map__cpu(orig, i).cpu < __perf_cpu_map__cpu(other, j).cpu) in perf_cpu_map__intersect()
470 else if (__perf_cpu_map__cpu(orig, i).cpu > __perf_cpu_map__cpu(other, j).cpu) in perf_cpu_map__intersect()
474 tmp_cpus[k++] = __perf_cpu_map__cpu(orig, i++); in perf_cpu_map__intersect()