perf probe: Begin and end libdwfl report session correctly
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / probe-finder.c
index 29c43c0680a8fc0dbefbd9d35b5e6488d6807f40..35f905f4f34cdb84dd804d046a1c624c13e18171 100644 (file)
@@ -70,6 +70,7 @@ static int debuginfo__init_offline_dwarf(struct debuginfo *dbg,
        if (!dbg->dwfl)
                goto error;
 
+       dwfl_report_begin(dbg->dwfl);
        dbg->mod = dwfl_report_offline(dbg->dwfl, "", "", fd);
        if (!dbg->mod)
                goto error;
@@ -78,6 +79,8 @@ static int debuginfo__init_offline_dwarf(struct debuginfo *dbg,
        if (!dbg->dbg)
                goto error;
 
+       dwfl_report_end(dbg->dwfl, NULL, NULL);
+
        return 0;
 error:
        if (dbg->dwfl)