在Linsched中使用task_struct
Working with task_struct in Linsched
我想获得有关任务的信息,例如任务的总执行时间(带有task_exec_time(task))、未运行的时间(task->sched_info.run_delay)以及调度器调用任务的次数(task->sched_info.pcount)。为此,我想使用struct task_struct *linsched_get_task(int task_id);这在文章http://www.ibm.com/developerworks/library/l-linux-scheduler-simulator/中有描述。然后当我编译程序时,它说这个结构体没有这些成员。
void linsched_print_task_stats(void);
有人试过吗?
所有需要的信息(task_exec_time, run_delay, pcount)都由"linsched_print_stats"函数打印。如果您在测试应用程序中将"print_tasks"字段设置为1,则在模拟之后调用该函数:
linsched_global_options。Print_tasks = 1;针对linsched_run_sim(节拍);
相关文章:
- std::map<struct,struct>::find 找不到匹配项,但是如果我循环通过 begin() 到 end(),我在那里看到匹配项
- Openssl 1.1.1d无效使用不完整的类型"struct dsa_st"
- 为什么我的C#代码在调用回C++COM直到Task时会暂停.等待/线程.加入
- C++Union/Struct位域的实现和可移植性
- 如何在c++中定义以struct为数据成员的类中的构造函数
- 使用"Task"函数指针队列定义作业管理器
- 结构体 S { int align; } 之间的区别;(struct 关键字后的名称)和 struct { int al
- struct.error:解压缩 C++ 结构时,解包需要 288 字节的缓冲区
- Visual Studio C++ Project File CustomBuild Task: Filter Outp
- 错误:"Left of getValue must have class/struct/union"
- 在 SVM-Struct 中未定义对 sqrt 的引用(已使用 -lm)
- 数据类型"struct seq<0, 1, 2>{}"含义是什么?
- 附加使用 Struct 作为"multikey"并将 std::vector 用作映射值的映射
- QML/C++/QObject Struct Copy
- 如何在 cpp 中解压缩数字,如果它们是使用 struct.pack(fmt, v1, v2, ..) 打包在 pyth
- Msgpack能否提供更好的性能和与Python的struct.pack()相同的功能?
- 将向量传递给<struct> Lua 表
- MPI_DOUBLE_INT and C++ struct
- C++ 中的"template <typename From, typename Tag> struct Alias;"是什么?
- 如何使用Struct打印交换函数