요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
1
What: /sys/bus/event_source/devices/<dev>/format
2
Date: January 2012
3
KernelVersion: 3.3
4
Contact: Jiri Olsa <[email protected]>
5
Description:
6
Attribute group to describe the magic bits that go into
7
perf_event_attr::config[012] for a particular pmu.
8
Each attribute of this group defines the 'hardware' bitmask
9
we want to export, so that userspace can deal with sane
10
name/value pairs.
12
Userspace must be prepared for the possibility that attributes
13
define overlapping bit ranges. For example::
15
attr1 = 'config:0-23'
16
attr2 = 'config:0-7'
17
attr3 = 'config:12-35'
19
Example: 'config1:1,6-10,44'
20
Defines contents of attribute that occupies bits 1,6-10,44 of
21
perf_event_attr::config1.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
perf_event_attr config bitmask format
1-21| 항목 | 전문 번역 |
|---|---|
| What | /sys/bus/event_source/devices/<dev>/format |
| Date | 2012년 1월 |
| KernelVersion | 3.3 |
| Contact | Jiri Olsa <[email protected]> |
| Description | 특정 PMU의 perf_event_attr::config[012]에 들어가는 magic bits를 설명하는 attribute group입니다. 이 group의 각 attribute는 export할 hardware bitmask를 정의하여 userspace가 이해하기 쉬운 name/value pairs를 다룰 수 있게 합니다. |
Userspace는 attributes가 overlapping bit ranges를 정의할 가능성에 대비해야 합니다.
attr1 = 'config:0-23'
attr2 = 'config:0-7'
attr3 = 'config:12-35'
다음 example은 attribute 내용이 perf_event_attr::config1의 bits 1, 6-10, 44를 차지함을 정의합니다.
config1:1,6-10,44
PMU term bitmask definitions
sysfs-bus-event_source-devices-format:1-21format group의 각 attribute는 userspace용 name/value pair를 config[012] hardware bits에 mapping하며 서로 겹치는 ranges도 허용합니다.