|
@@ -26,12 +26,19 @@ func (t *Tracer) stack() error {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
ENV_PID := os.Getenv("FILTER_PID")
|
|
ENV_PID := os.Getenv("FILTER_PID")
|
|
|
|
|
+ WHITE_LIST := os.Getenv("WHITE_LIST")
|
|
|
if ENV_PID == "" {
|
|
if ENV_PID == "" {
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
MatchString := ".*HandleFunc|.*main.*|testfun.*|.*serverHandler.*|.*ServeHTTP.*"
|
|
MatchString := ".*HandleFunc|.*main.*|testfun.*|.*serverHandler.*|.*ServeHTTP.*"
|
|
|
|
|
|
|
|
|
|
+ if WHITE_LIST != "" {
|
|
|
|
|
+ MatchString = WHITE_LIST
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ fmt.Println("UprobesMatchString::: init", MatchString)
|
|
|
|
|
+
|
|
|
pid, _ := strconv.ParseInt(ENV_PID, 10, 32)
|
|
pid, _ := strconv.ParseInt(ENV_PID, 10, 32)
|
|
|
path := proc.Path(uint32(pid), "exe")
|
|
path := proc.Path(uint32(pid), "exe")
|
|
|
|
|
|