요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
PMU name과 branch-counter metadata
sysfs-bus-event_source-devices-caps:16-24pmu_name은 PMU driver가 아는 CPU name을 노출하고 branch_counter_nr·branch_counter_width는 perf가 각 branch의 logged counters를 parse하는 데 사용합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/event_source/devices/<dev>/caps
Date: May 2022
KernelVersion: 5.19
Contact: Linux kernel mailing list <[email protected]>
Description:
Attribute group to describe the capabilities exposed
for a particular pmu. Each attribute of this group can
expose information specific to a PMU, say pmu_name, so that
userspace can understand some of the feature which the
platform specific PMU supports.
One of the example available capability in supported platform
like Intel is pmu_name, which exposes underlying CPU name known
to the PMU driver.
Example output in powerpc:
grep . /sys/bus/event_source/devices/cpu/caps/*
/sys/bus/event_source/devices/cpu/caps/pmu_name:POWER9
The "branch_counter_nr" in the supported platform exposes the
maximum number of counters which can be shown in the u64 counters
of PERF_SAMPLE_BRANCH_COUNTERS, while the "branch_counter_width"
exposes the width of each counter. Both of them can be used by
the perf tool to parse the logged counters in each branch.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
PMU capability attribute group
1-14| 항목 | 전문 번역 |
|---|---|
| What | /sys/bus/event_source/devices/<dev>/caps |
| Date | 2022년 5월 |
| KernelVersion | 5.19 |
| Contact | Linux 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-24PowerPC에서 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할 수 있습니다.
PMU-specific capability attributes
sysfs-bus-event_source-devices-caps:1-14caps group의 각 attribute는 userspace가 platform-specific PMU features를 이해할 수 있도록 pmu_name 같은 PMU-specific information을 제공합니다.