← Documents Documentation/ABI/testing/sysfs-bus-event_source-devices-caps GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Perf PMU capabilities sysfs ABI

PMU별 platform capabilities를 제공하는 caps attribute group과 pmu_name, branch_counter_nr, branch_counter_width의 userspace contract를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-bus-event_source-devices-caps
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

PMU-specific capability attributes

sysfs-bus-event_source-devices-caps:1-14

caps group의 각 attribute는 userspace가 platform-specific PMU features를 이해할 수 있도록 pmu_name 같은 PMU-specific information을 제공합니다.

PMU name과 branch-counter metadata

sysfs-bus-event_source-devices-caps:16-24

pmu_name은 PMU driver가 아는 CPU name을 노출하고 branch_counter_nr·branch_counter_width는 perf가 각 branch의 logged counters를 parse하는 데 사용합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/bus/event_source/devices/<dev>/caps
2 Date: May 2022
3 KernelVersion: 5.19
4 Contact: Linux kernel mailing list <[email protected]>
5 Description:
6 Attribute group to describe the capabilities exposed
7 for a particular pmu. Each attribute of this group can
8 expose information specific to a PMU, say pmu_name, so that
9 userspace can understand some of the feature which the
10 platform specific PMU supports.
11
12 One of the example available capability in supported platform
13 like Intel is pmu_name, which exposes underlying CPU name known
14 to the PMU driver.
15
16 Example output in powerpc:
17 grep . /sys/bus/event_source/devices/cpu/caps/*
18 /sys/bus/event_source/devices/cpu/caps/pmu_name:POWER9
19
20 The "branch_counter_nr" in the supported platform exposes the
21 maximum number of counters which can be shown in the u64 counters
22 of PERF_SAMPLE_BRANCH_COUNTERS, while the "branch_counter_width"
23 exposes the width of each counter. Both of them can be used by
24 the perf tool to parse the logged counters in each branch.
25

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

PMU capability attribute group

1-14
항목전문 번역
What/sys/bus/event_source/devices/<dev>/caps
Date2022년 5월
KernelVersion5.19
ContactLinux kernel mailing list <[email protected]>
Description특정 PMU가 노출하는 capabilities를 설명하는 attribute group입니다. 이 group의 각 attribute는 pmu_name 같은 PMU-specific information을 제공하여 userspace가 platform-specific PMU가 지원하는 features 일부를 이해할 수 있게 합니다. Intel 같은 지원 platform에서 사용할 수 있는 capability 예로 pmu_name이 있으며, PMU driver가 알고 있는 underlying CPU name을 노출합니다.

PowerPC와 branch-counter capability examples

16-24

PowerPC에서 caps attributes를 조회하는 예와 출력은 다음과 같습니다.

grep . /sys/bus/event_source/devices/cpu/caps/*
/sys/bus/event_source/devices/cpu/caps/pmu_name:POWER9

지원 platform의 branch_counter_nr은 PERF_SAMPLE_BRANCH_COUNTERS의 u64 counters에서 표시할 수 있는 최대 counter 수를 노출하고 branch_counter_width는 각 counter의 width를 노출합니다. Perf tool은 두 값을 함께 사용해 각 branch에 기록된 counters를 parse할 수 있습니다.