|
@@ -687,6 +687,7 @@ struct event_modifier {
|
|
|
int eG;
|
|
|
int precise;
|
|
|
int exclude_GH;
|
|
|
+ int sample_read;
|
|
|
};
|
|
|
|
|
|
static int get_event_modifier(struct event_modifier *mod, char *str,
|
|
@@ -698,6 +699,7 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
|
|
|
int eH = evsel ? evsel->attr.exclude_host : 0;
|
|
|
int eG = evsel ? evsel->attr.exclude_guest : 0;
|
|
|
int precise = evsel ? evsel->attr.precise_ip : 0;
|
|
|
+ int sample_read = 0;
|
|
|
|
|
|
int exclude = eu | ek | eh;
|
|
|
int exclude_GH = evsel ? evsel->exclude_GH : 0;
|
|
@@ -730,6 +732,8 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
|
|
|
/* use of precise requires exclude_guest */
|
|
|
if (!exclude_GH)
|
|
|
eG = 1;
|
|
|
+ } else if (*str == 'S') {
|
|
|
+ sample_read = 1;
|
|
|
} else
|
|
|
break;
|
|
|
|
|
@@ -756,6 +760,7 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
|
|
|
mod->eG = eG;
|
|
|
mod->precise = precise;
|
|
|
mod->exclude_GH = exclude_GH;
|
|
|
+ mod->sample_read = sample_read;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -768,7 +773,7 @@ static int check_modifier(char *str)
|
|
|
char *p = str;
|
|
|
|
|
|
/* The sizeof includes 0 byte as well. */
|
|
|
- if (strlen(str) > (sizeof("ukhGHppp") - 1))
|
|
|
+ if (strlen(str) > (sizeof("ukhGHpppS") - 1))
|
|
|
return -1;
|
|
|
|
|
|
while (*p) {
|
|
@@ -806,6 +811,7 @@ int parse_events__modifier_event(struct list_head *list, char *str, bool add)
|
|
|
evsel->attr.exclude_host = mod.eH;
|
|
|
evsel->attr.exclude_guest = mod.eG;
|
|
|
evsel->exclude_GH = mod.exclude_GH;
|
|
|
+ evsel->sample_read = mod.sample_read;
|
|
|
}
|
|
|
|
|
|
return 0;
|