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

ascope for exec

fix forkexectree
上级 8a1a20a6
#include "types.h" #include "types.h"
#include "stat.h" #include "stat.h"
#include "user.h" #include "user.h"
#include "mtrace.h"
#define NCHILD 2 #define NCHILD 2
#define NDEPTH 7 #define NDEPTH 7
...@@ -11,7 +10,6 @@ forktree(int depth) ...@@ -11,7 +10,6 @@ forktree(int depth)
{ {
if (depth == 0) { if (depth == 0) {
fprintf(1, "%d: forkexectree\n", getpid()); fprintf(1, "%d: forkexectree\n", getpid());
mtenable("xv6-forkexectree");
} }
if (depth >= NDEPTH) if (depth >= NDEPTH)
...@@ -48,9 +46,6 @@ forktree(int depth) ...@@ -48,9 +46,6 @@ forktree(int depth)
if (depth > 0) if (depth > 0)
exit(); exit();
mtops(0);
mtdisable("xv6-forkexectree");
fprintf(1, "%d: forkexectree OK\n", getpid()); fprintf(1, "%d: forkexectree OK\n", getpid());
// halt(); // halt();
} }
......
...@@ -428,6 +428,9 @@ sys_exec(const char *path, u64 uargv) ...@@ -428,6 +428,9 @@ sys_exec(const char *path, u64 uargv)
if(argcheckstr(path) < 0) { if(argcheckstr(path) < 0) {
return -1; return -1;
} }
mt_ascope ascope("%s(%s)", __func__, path);
memset(argv, 0, sizeof(argv)); memset(argv, 0, sizeof(argv));
for(i=0;; i++){ for(i=0;; i++){
if(i >= NELEM(argv)) if(i >= NELEM(argv))
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论