builtin-script.c (64aab93cdffb3967642ffab954395ae2400c0b06) | builtin-script.c (efad14150a0b4429f37da7245001a8096ef7ee38) |
---|---|
1#include "builtin.h" 2 3#include "perf.h" 4#include "util/cache.h" 5#include "util/debug.h" 6#include "util/exec_cmd.h" 7#include "util/header.h" 8#include "util/parse-options.h" --- 420 unchanged lines hidden (view full) --- 429 430static int cleanup_scripting(void) 431{ 432 pr_debug("\nperf script stopped\n"); 433 434 return scripting_ops->stop_script(); 435} 436 | 1#include "builtin.h" 2 3#include "perf.h" 4#include "util/cache.h" 5#include "util/debug.h" 6#include "util/exec_cmd.h" 7#include "util/header.h" 8#include "util/parse-options.h" --- 420 unchanged lines hidden (view full) --- 429 430static int cleanup_scripting(void) 431{ 432 pr_debug("\nperf script stopped\n"); 433 434 return scripting_ops->stop_script(); 435} 436 |
437static char const *input_name = "perf.data"; | 437static const char *input_name; |
438 439static int process_sample_event(struct perf_tool *tool __used, 440 union perf_event *event, 441 struct perf_sample *sample, 442 struct perf_evsel *evsel, 443 struct machine *machine) 444{ 445 struct addr_location al; --- 865 unchanged lines hidden (view full) --- 1311 int input; 1312 1313 if (output_set_by_user()) { 1314 fprintf(stderr, 1315 "custom fields not supported for generated scripts"); 1316 return -1; 1317 } 1318 | 438 439static int process_sample_event(struct perf_tool *tool __used, 440 union perf_event *event, 441 struct perf_sample *sample, 442 struct perf_evsel *evsel, 443 struct machine *machine) 444{ 445 struct addr_location al; --- 865 unchanged lines hidden (view full) --- 1311 int input; 1312 1313 if (output_set_by_user()) { 1314 fprintf(stderr, 1315 "custom fields not supported for generated scripts"); 1316 return -1; 1317 } 1318 |
1319 input = open(input_name, O_RDONLY); | 1319 input = open(session->filename, O_RDONLY); /* input_name */ |
1320 if (input < 0) { 1321 perror("failed to open file"); 1322 exit(-1); 1323 } 1324 1325 err = fstat(input, &perf_stat); 1326 if (err < 0) { 1327 perror("failed to stat file"); --- 37 unchanged lines hidden --- | 1320 if (input < 0) { 1321 perror("failed to open file"); 1322 exit(-1); 1323 } 1324 1325 err = fstat(input, &perf_stat); 1326 if (err < 0) { 1327 perror("failed to stat file"); --- 37 unchanged lines hidden --- |