Commit 7600e1a 1 parent d3d9b2d commit 7600e1a Copy full SHA for 7600e1a
File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -353,6 +353,8 @@ struct Caliper::GlobalData
353
353
delete ptr;
354
354
ptr = tmp;
355
355
}
356
+
357
+ s_init_hooks = nullptr ;
356
358
}
357
359
358
360
// --- data
Original file line number Diff line number Diff line change @@ -168,17 +168,17 @@ class LibpfmService
168
168
static void sigio_handler (int sig, siginfo_t *info, void *extra) {
169
169
perf_event_desc_t *fdx = 0 ;
170
170
struct perf_event_header ehdr;
171
- int fd, i, ret;
172
171
173
- fd = info->si_fd ;
172
+ int fd = info->si_fd ;
174
173
175
- ret = ioctl (fd, PERF_EVENT_IOC_DISABLE, 0 );
174
+ int ret = ioctl (fd, PERF_EVENT_IOC_DISABLE, 0 );
176
175
if (ret)
177
176
Log (0 ).stream () << " libpfm: cannot stop sampling for handling" << std::endl;
178
177
179
178
sI ->signals_received ++;
180
179
181
- for (i=0 ; i<sT .num_events ; i++) {
180
+ int i = 0 ;
181
+ for (i = 0 ; i<sT .num_events ; i++) {
182
182
if (fd == sT .fds [i].fd ) {
183
183
fdx = &sT .fds [i];
184
184
break ;
@@ -351,7 +351,7 @@ class LibpfmService
351
351
}
352
352
353
353
int end_thread_sampling () {
354
- int ret;
354
+ int ret = 0 ;
355
355
size_t pgsz = sysconf (_SC_PAGESIZE);
356
356
357
357
for (int i=0 ; i<sT .num_events ; i++) {
You can’t perform that action at this time.
0 commit comments