性能之巅 性能之巅 8.7分

翻译读起来累人,还会有误导

员外
2018-03-04 09:30:18

相对来说,读起来累是比较次要的。

读到第 83 页读不下去了,82/83 页有一段是这样的:

...... 而是只添加一个系统调用:perf_event_open(),它会用 ioctl() 返回一个文件描述符。...... 在这种情况下,开发人员可以很容易地对参数 PERF_EVENT_IOC_ENABLE 做添加和修改。

找了一下,对应原文是:

...... a single system call is added: perf_event_open(), which returns a file descriptor for use with ioctl(). ...... The arguments, in this example PERF_EVENT_IOC_ENABLE, can be more easily added and changed by the developer.

附整段原文:

The ioctl() syscall may be the most difficult to learn, due to its ambiguous nature. As an example of its usage, the Linux perf(1) tool (introduced in Chapter 6, CPUs) performs privileged actions to coordinate performance instrumentation. Instead of system calls being added for each action, a single system call is added: perf_event_open(), which returns a file descriptor for use with ioctl(). This ioctl() can then be called using different arguments to perform the different desired actions. For example, ioctl(fd, PERF_EVENT_IOC_ENABLE) enables instrumentation. The arguments, in this example PERF_EVENT_IOC_ENABLE, can be more easily added and changed by the developer.

3
0

查看更多豆瓣高分好书

回应(2)

添加回应

性能之巅的更多书评

推荐性能之巅的豆列

了解更多图书信息

豆瓣
免费下载 iOS / Android 版客户端