staticvoid *perf_evlist__poll_thread(void *arg)
{ struct evlist *evlist = arg; bool draining = false; int i, done = 0; /* * In order to read symbols from other namespaces perf to needs to call * setns(2). This isn't permitted if the struct_fs has multiple users. * unshare(2) the fs so that we may continue to setns into namespaces * that we're observing when, for instance, reading the build-ids at * the end of a 'perf record' session.
*/
unshare(CLONE_FS);
while (!done) { bool got_data = false;
if (evlist->thread.done)
draining = true;
if (!draining)
evlist__poll(evlist, 1000);
for (i = 0; i < evlist->core.nr_mmaps; i++) { struct mmap *map = &evlist->mmap[i]; union perf_event *event;
if (perf_mmap__read_init(&map->core)) continue; while ((event = perf_mmap__read_event(&map->core)) != NULL) { struct evsel *evsel = evlist__event2evsel(evlist, event);
if (evsel && evsel->side_band.cb)
evsel->side_band.cb(event, evsel->side_band.data); else
pr_warning("cannot locate proper evsel for the side band event\n");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.