lkml.org 
[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH]Perf: Return error code for perf_session__new function on failure
From
Date
Hi Jiri Olsa,

Thanks for reviewing the patch..

working on your comments, will post new version ASAP.


On 15/08/19 6:21 PM, Jiri Olsa wrote:
> On Wed, Aug 14, 2019 at 03:02:18PM +0530, Mamatha Inamdar wrote:
>
> SNIP
>
>> symbol_conf.pid_list_str = strdup(trace->opts.target.pid);
>> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
>> index ddbcd59..dbc6dc2 100644
>> --- a/tools/perf/util/data-convert-bt.c
>> +++ b/tools/perf/util/data-convert-bt.c
>> @@ -1619,8 +1619,10 @@ int bt_convert__perf2ctf(const char *input, const char *path,
>> err = -1;
>> /* perf.data session */
>> session = perf_session__new(&data, 0, &c.tool);
>> - if (!session)
>> + if (IS_ERR(session)) {
>> + err = PTR_ERR(session);
>> goto free_writer;
>> + }
>>
>> if (c.queue_size) {
>> ordered_events__set_alloc_size(&session->ordered_events,
> I'm getting:
>
> CC util/data-convert-bt.o
> util/data-convert-bt.c: In function ‘bt_convert__perf2ctf’:
> util/data-convert-bt.c:1622:6: error: implicit declaration of function ‘IS_ERR’; did you mean ‘SIG_ERR’? [-Werror=implicit-function-declaration]
> 1622 | if (IS_ERR(session)) {
> | ^~~~~~
> | SIG_ERR
> util/data-convert-bt.c:1622:6: error: nested extern declaration of ‘IS_ERR’ [-Werror=nested-externs]
> util/data-convert-bt.c:1623:9: error: implicit declaration of function ‘PTR_ERR’ [-Werror=implicit-function-declaration]
> 1623 | err = PTR_ERR(session);
>
>
> jirka
>

\
 
 \ /
  Last update: 2019-08-20 10:39    [W:0.085 / U:5.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site