搜索

此内容没有您所选择的语言版本。

29.2.3. Separating Kernel and User-space Profiles

download PDF
By default, kernel mode and user mode information is gathered for each event. To configure OProfile to ignore events in kernel mode for a specific counter, execute the following command:
~]# opcontrol --event=event-name:sample-rate:unit-mask:0
Execute the following command to start profiling kernel mode for the counter again:
~]# opcontrol --event=event-name:sample-rate:unit-mask:1
To configure OProfile to ignore events in user mode for a specific counter, execute the following command:
~]# opcontrol --event=event-name:sample-rate:unit-mask:kernel:0
Execute the following command to start profiling user mode for the counter again:
~]# opcontrol --event=event-name:sample-rate:unit-mask:kernel:1
When the OProfile daemon writes the profile data to sample files, it can separate the kernel and library profile data into separate sample files. To configure how the daemon writes to sample files, execute the following command as root:
~]# opcontrol --separate=choice
choice can be one of the following:
  • none — Do not separate the profiles (default).
  • library — Generate per-application profiles for libraries.
  • kernel — Generate per-application profiles for the kernel and kernel modules.
  • all — Generate per-application profiles for libraries and per-application profiles for the kernel and kernel modules.
If --separate=library is used, the sample file name includes the name of the executable as well as the name of the library.

Note

These configuration changes will take effect when the OProfile profiler is restarted.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.