当前位置: 首页 > news >正文

Events and the Kernel

http://qnx.com/developers/docs/7.1/index.html#com.qnx.doc.sat/topic/events.html

qnx 内核产生内核事件

  • kernel calls
  • scheduling activity
  • interrupt handling
  • thread/process creation, destruction, and state changes

In addition, the instrumented kernel also inserts “artificial” events for:

  • time events
  • user events that may be used as “marker flags

Kernel Buffer Management

Each buffer is of a fixed size and is divided into a fixed number of slots:

  • Event buffer slots per buffer: 1024
  • Event buffer slot size: 16 bytes
  • Buffer size: 16 KB

简单的内核事件一个slot 够了,组合复杂事件需要多个slot 保存

当一个buffer 满了,proc-to 就会发生_NTO_HOOK_TRACE synthetic interrupt通知data-capture 程序读准备好可以取数据

 To ensure this never happens, the instrumented kernel requests a buffer flush at the high-water mark.

The high-water mark is set at an efficient, yet conservative, level:

  • around 70% (_TRACEBUF_MAX_EVENTS) for linear mode
  • around 95% (_TRACEBUF_MAX_EVENTS_RING) for ring mode

由于中断里不能保存buffer ,因此系统在buffer填充达到一个水位就产生中断通知取数据

Capturing Trace Data

抓事件程序与内核交互,将内核发送事件保存到文件系统,抓取配置

  • buffer allocations (size)
  • which events and classes of events to log (filtering)
  • whether to log the events in wide mode or fast mode

抓取程序:

You can control the capture of data via qconn (under the control of the IDE), tracelogger (from the command line), or directly from your application. All three approaches use the TraceEvent() function to control the instrumented kernel:

tracelogger 抓取模式

ModeOptionThe kernel:tracelogger:
Continuous-cLogs eventsCaptures the events, and continues to do so until terminated
Daemon-d1Doesn't log eventsaWaits passivelya
Iterations (the default)-nLogs eventsCaptures num_buffers of data and then terminates
Ring-rLogs eventsDoesn't capture events until it gets a SIGINT signal, or an application calls TraceEvent()b with a command of _NTO_TRACE_STOP
Time-based-sLogs eventsCaptures events for the specified number of seconds

By default, the instrumented kernel and tracelogger collect data in fast mode; to switch to wide mode, specify the -w option when you start tracelogger

By default, tracelogger captures all events from all classes, but you can disable the tracing of events from the classes as follows

To disable this class:Specify:
Kernel calls-F1
Interrupt-F2
Process-F3
Thread-F4
Virtual thread-F5
Communication-F6
System-F7

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • HarmonyOS NEXT星河版零基础入门(2)
  • 3-2 光敏电阻(智能应用篇)
  • 构建坚不可摧的防线:全面指南到高效信息安全管理体系
  • 力扣第五十六题——合并区间
  • 设计模式-装饰者模式
  • ubuntu创建txt
  • 2024年TI杯E题-三子棋游戏装置方案分享-jdk123团队-第二弹 手搓机械臂
  • 搅拌站智能化改造,数字化管理如何助力降本增效?
  • 走心解答hashCode与equals,尽量说明白
  • Windows图形界面(GUI)-MFC-C/C++ - 树形视图(Tree Control) - CTreeCtrl
  • 超声波眼镜清洗机哪个更好用?四款清洁力强的超声波清洗机推荐
  • 24.8.9.11数据结构|链栈和队列
  • 程序人生-Hello’s P2P
  • vue3引入模块报错:无法找到模块“xxx”的声明文件
  • Java 守护线程练习 (2024.8.12)
  • 【每日笔记】【Go学习笔记】2019-01-10 codis proxy处理流程
  • 08.Android之View事件问题
  • Akka系列(七):Actor持久化之Akka persistence
  • ES10 特性的完整指南
  • fetch 从初识到应用
  • HTTP那些事
  • Java知识点总结(JavaIO-打印流)
  • Js基础知识(四) - js运行原理与机制
  • Protobuf3语言指南
  • Python代码面试必读 - Data Structures and Algorithms in Python
  • SAP云平台运行环境Cloud Foundry和Neo的区别
  • Spring Boot MyBatis配置多种数据库
  • ucore操作系统实验笔记 - 重新理解中断
  • uva 10370 Above Average
  • vue-cli在webpack的配置文件探究
  • VuePress 静态网站生成
  • 海量大数据大屏分析展示一步到位:DataWorks数据服务+MaxCompute Lightning对接DataV最佳实践...
  • 基于阿里云移动推送的移动应用推送模式最佳实践
  • 批量截取pdf文件
  • 系统认识JavaScript正则表达式
  • 测评:对于写作的人来说,Markdown是你最好的朋友 ...
  • ​如何使用QGIS制作三维建筑
  • #565. 查找之大编号
  • #include
  • #鸿蒙生态创新中心#揭幕仪式在深圳湾科技生态园举行
  • #设计模式#4.6 Flyweight(享元) 对象结构型模式
  • (07)Hive——窗口函数详解
  • (3)选择元素——(14)接触DOM元素(Accessing DOM elements)
  • (aiohttp-asyncio-FFmpeg-Docker-SRS)实现异步摄像头转码服务器
  • (Oracle)SQL优化技巧(一):分页查询
  • (利用IDEA+Maven)定制属于自己的jar包
  • (论文阅读32/100)Flowing convnets for human pose estimation in videos
  • (转载)虚幻引擎3--【UnrealScript教程】章节一:20.location和rotation
  • (自用)gtest单元测试
  • .Net 8.0 新的变化
  • .net Application的目录
  • .NET Core WebAPI中使用Log4net 日志级别分类并记录到数据库
  • .net 调用海康SDK以及常见的坑解释
  • .NET 中选择合适的文件打开模式(CreateNew, Create, Open, OpenOrCreate, Truncate, Append)
  • .NET/C# 的字符串暂存池