File tree 1 file changed +4
-14
lines changed
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -2275,23 +2275,13 @@ static int __cmd_record(int argc, const char **argv)
2275
2275
return - ENOMEM ;
2276
2276
2277
2277
for (i = 0 ; i < ARRAY_SIZE (record_args ); i ++ )
2278
- rec_argv [i ] = strdup ( record_args [i ]) ;
2278
+ rec_argv [i ] = record_args [i ];
2279
2279
2280
2280
for (j = 0 ; j < nr_tracepoints ; j ++ ) {
2281
- const char * ev_name ;
2282
-
2283
- if (has_lock_stat )
2284
- ev_name = strdup (lock_tracepoints [j ].name );
2285
- else
2286
- ev_name = strdup (contention_tracepoints [j ].name );
2287
-
2288
- if (!ev_name ) {
2289
- free (rec_argv );
2290
- return - ENOMEM ;
2291
- }
2292
-
2293
2281
rec_argv [i ++ ] = "-e" ;
2294
- rec_argv [i ++ ] = ev_name ;
2282
+ rec_argv [i ++ ] = has_lock_stat
2283
+ ? lock_tracepoints [j ].name
2284
+ : contention_tracepoints [j ].name ;
2295
2285
}
2296
2286
2297
2287
for (j = 0 ; j < nr_callgraph_args ; j ++ , i ++ )
You can’t perform that action at this time.
0 commit comments