private List<EBPFProfilingTaskCommand> buildProfilingCommands(EBPFProfilingTaskRecord task, List<Process> processes) {
        if (EBPFProfilingTargetType.NETWORK.value() == task.getTargetType()) {
            final List<String> processIdList = processes.stream().filter(p -> Objects.equals(p.getInstanceId(), task.getInstanceId())).map(Process::getId).collect(Collectors.toList());
            if (CollectionUtils.isEmpty(processIdList)) {
                return Collections.emptyList();
            }
            return Collections.singletonList(commandService.newEBPFProfilingTaskCommand(task, processIdList));
        }
        final ArrayList<EBPFProfilingTaskCommand> commands = new ArrayList<>(processes.size());
        for (Process process : processes) {
            // The service id must match between process and task and must could profiling
            if (!Objects.equals(process.getServiceId(), task.getServiceId())
                || !ProfilingSupportStatus.SUPPORT_EBPF_PROFILING.name().equals(process.getProfilingSupportStatus())) {
                continue;
            }

            // If the task doesn't require a label or the process match all labels in task
            List<String> processLabels = Collections.emptyList();
            if (StringUtil.isNotEmpty(task.getProcessLabelsJson())) {
                processLabels = GSON.<List<String>>fromJson(task.getProcessLabelsJson(), ArrayList.class);
            }
            if (CollectionUtils.isEmpty(processLabels)
                    || process.getLabels().containsAll(processLabels)) {
                commands.add(commandService.newEBPFProfilingTaskCommand(task, Collections.singletonList(process.getId())));
            }
        }
        return commands;
    }
When querying profiling tasks, processes from the last few minutes would be queried.
oap-server/server-receiver-plugin/skywalking-ebpf-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/ebpf/provider/handler/EBPFProfilingServiceHandler.java