tracing: Let filter_assign_type() detect FILTER_PTR_STRING

filter_assign_type() could detect dynamic string and static
string, but not string pointers. Teach filter_assign_type()
to detect string pointers, and this will be needed by trace
event injection code.

BTW, trace event hist uses FILTER_PTR_STRING too.
Link: http://lkml.kernel.org/r/[email protected]

Cc: Ingo Molnar <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
This commit is contained in:
Cong Wang
2019-07-16 15:14:48 -04:00
committed by Steven Rostedt (VMware)
parent 46710f3a34
commit 5967bd5c42
+3
View File
@@ -1080,6 +1080,9 @@ int filter_assign_type(const char *type)
if (strchr(type, '[') && strstr(type, "char"))
return FILTER_STATIC_STRING;
if (strcmp(type, "char *") == 0 || strcmp(type, "const char *") == 0)
return FILTER_PTR_STRING;
return FILTER_OTHER;
}