diff options
Diffstat (limited to 'tapset/http_request.stp')
-rw-r--r-- | tapset/http_request.stp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tapset/http_request.stp b/tapset/http_request.stp new file mode 100644 index 0000000..2f1514a --- /dev/null +++ b/tapset/http_request.stp @@ -0,0 +1,40 @@ +/* keyed by: [pid(),fd] */ +global cmogstored_http_req_begin; +global cmogstored_http_pipelined; +global cmogstored_http_addr; + +probe process("cmogstored").mark("http_accepted") { + fd = $arg1; + host = user_string($arg2); + serv = user_string($arg3); + host_serv = sprintf("%s%s", host, serv); + printf("% 8d accepted %s\n", fd, host_serv); + cmogstored_http_addr[pid(),fd] = host_serv; +} + +probe process("cmogstored").function("http_close") { + fd = @cast($mfd, "struct mog_fd")->fd; + printf("% 8d closing\n", fd); + delete cmogstored_http_addr[pid(),fd]; +} + +probe process("cmogstored").mark("http_req_begin") { + fd = @cast($mfd, "struct mog_fd")->fd; + is_pipelined = $arg1; + cmogstored_http_req_begin[pid(),fd] = gettimeofday_us(); + cmogstored_http_pipelined[pid(),fd] = is_pipelined; +} + +probe process("cmogstored").function("http_process_client") { + fd = @cast($mfd, "struct mog_fd")->fd; + starttime = cmogstored_http_req_begin[pid(),fd]; + diff = gettimeofday_us() - starttime; + + is_pipelined = cmogstored_http_pipelined[pid(),fd]; + printf("% 8d http_process_client time %ldus (pipelined:%s)\n", + fd, diff, is_pipelined ? "true" : "false"); +} + +probe process("cmogstored").mark("write_buffered") { + printf("% 8d blocked with %lu bytes to write\n", $fd, $len); +} |