提交 fb1892e0 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

include an abstract write to current thread, to avoid reporting

unexpected sharing of kernel stack.
上级 a254dac5
......@@ -285,6 +285,7 @@ sys_openat(int dirfd, const char *path, int omode)
// Reads the dirfd FD, dirfd's inode, the inodes of all files in
// path; writes the returned FD
mt_ascope ascope("%s(%d,%s,%d)", __func__, dirfd, path, omode);
mtwriteavar("thread:%x", myproc()->pid);
mtreadavar("inode:%x.%x", cwd->dev, cwd->inum);
if(omode & O_CREATE){
......
......@@ -90,6 +90,7 @@ sys_map(uptr addr, u64 len)
#if MTRACE
mt_ascope ascope("%s(%p,%lx)", __func__, addr, len);
mtwriteavar("thread:%x", myproc()->pid);
for (uptr i = PGROUNDDOWN(addr); i < PGROUNDUP(addr + len); i += PGSIZE)
mtwriteavar("page:%016x", i);
#endif
......@@ -113,6 +114,7 @@ sys_unmap(uptr addr, u64 len)
#if MTRACE
mt_ascope ascope("%s(%p,%lx)", __func__, addr, len);
mtwriteavar("thread:%x", myproc()->pid);
for (uptr i = PGROUNDDOWN(addr); i < PGROUNDUP(addr + len); i += PGSIZE)
mtwriteavar("page:%016x", i);
#endif
......
......@@ -577,6 +577,7 @@ pagefault(struct vmap *vmap, uptr va, u32 err)
{
#if MTRACE
mt_ascope ascope("%s(%p)", __func__, va);
mtwriteavar("thread:%x", myproc()->pid);
mtwriteavar("page:%016x", PGROUNDDOWN(va));
#endif
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论