From: Thomas Gruber <Thomas.Gruber@fau.de>
To: <binutils@sourceware.org>
Subject: Re: [gprofng] Parsing of function definitions fails
Date: Tue, 22 Mar 2022 17:51:39 +0100 [thread overview]
Message-ID: <ff63c9a7-8735-f007-d1de-fc9155a34a4a@fau.de> (raw)
In-Reply-To: <a6afda7d-9cb4-8a3b-f3ba-0851786fbfba@oracle.com>
Hi,
Thanks for the hint. But the double-quotes do not really help.
Function without any template parameter work:
(gp-display-text) fsingle _IO_vfscanf
_IO_vfscanf
Exclusive Total CPU Time: 13.199 ( 14.3%)
Inclusive Total CPU Time: 20.424 ( 22.1%)
Size: 33367
PC Address: 6:0x0006b1f0
Source File: (unknown)
Object File: (unknown)
Load Object: /lib/x86_64-linux-gnu/libc-2.27.so
Mangled Name:
Aliases:
Functions with one template parameter work:
(gp-display-text) fsingle rho_calc<double>
void rho_calc<double>(long, double const*, double*) [clone ._omp_fn.8]
Exclusive Total CPU Time: 1.001 ( 1.1%)
Inclusive Total CPU Time: 1.001 ( 1.1%)
Size: 828
PC Address: 12:0x000064f0
Source File: cg-omp.cpp
Object File: test.6.er/archives/cg-omp_1X48lPAm9a2
Load Object:
/home/hpc/unrz/unrz55/projects/PELS-Tutorial/CG/code/cg-omp
Mangled Name: _Z8rho_calcIdEvlPKT_PS0_._omp_fn.8
Aliases:
But function with multiple template parameters cause problems:
(gp-display-text) fsingle csr_spmv_kernel
Error: No function with given name `csr_spmv_kernel' found.
(gp-display-text) fsingle "csr_spmv_kernel<double, int>(long, long, int
const*, int const*, double const*, double const*, double*)"
Error: No function with given name `csr_spmv_kernel<double, int>(long,
long, int const*, int const*, double const*, double const*, double*)' found.
(gp-display-text) fsingle "csr_spmv_kernel<double,int>(long, long, int
const*, int const*, double const*, double const*, double*)"
Error: No function with given name `csr_spmv_kernel<double,int>(long,
long, int const*, int const*, double const*, double const*, double*)' found.
(gp-display-text) fsingle "csr_spmv_kernel<double,int>"
Error: No function with given name `csr_spmv_kernel<double,int>' found.
(gp-display-text) fsingle csr_spmv_kernel [N]
Error: Invalid number entered: [N]
Error: Invalid number entered: [N]
Error: No function with given name `csr_spmv_kernel' found.
I checked the documentation (gprofng/doc) and there the double-quotes
are not mentioned.
Best,
Thomas
Full list of functions for reference:
(gp-display-text) functions
Functions sorted by metric: Exclusive Total CPU Time
Excl. Incl. Name
Total Total
CPU sec. CPU sec.
92.455 92.455 <Total>
63.304 63.304 void csr_spmv_kernel<double, int>(long, long, int
const*, int const*, double const*, double const*, double*) [clone
._omp_fn.11]
13.199 20.424 _IO_vfscanf
3.362 3.362 void x_r_update<double>(long, double const*,
double const*, double*, double*, double const*) [clone ._omp_fn.13]
2.632 2.632 <static>@0x45142 (<libc-2.27.so>)
2.101 2.782 <static>@0x4917a (<libc-2.27.so>)
1.801 1.801 void p_update<double>(long, double*, double*,
double const*, double const*) [clone ._omp_fn.10]
1.591 1.591 void x_r_update<double>(long, double const*,
double const*, double*, double*, double const*) [clone ._omp_fn.12]
1.021 1.021 _IO_sputbackc
1.001 1.001 void rho_calc<double>(long, double const*,
double*) [clone ._omp_fn.8]
0.630 0.630 read
0.480 0.480 <static>@0x169c14 (<libc-2.27.so>)
0.380 0.380 <static>@0x52411 (<libc-2.27.so>)
0.350 21.135 void allocate_and_initialize<double,
int>(_IO_FILE*, int**, int**, double**, double**, double**, long, long,
long, long, char (&) [4])
0.200 20.624 fscanf
0.090 92.455 BenchmarkResult bench_cg<double, int>(_IO_FILE*,
long, long, long, long, stop_criterion&, char (&) [4])
0.080 0.080 void setup<double>(long, double const*, double*,
double*, double*) [clone ._omp_fn.7]
0.070 0.070 _pthread_cleanup_pop_restore
0.050 0.050 __strtol_internal
0.030 0.030 __strtod_internal
0.030 0.030 _pthread_cleanup_push_defer
0.030 0.030 vfscanf
0.010 71.150 GOMP_parallel
0.010 0.640 _IO_file_underflow
0. 71.170 BenchmarkResult cg<double, int>(stop_criterion&,
long, long, long, int const*, int const*, double const*, double const*,
double*, bool)
0. 0.640 _IO_default_uflow
0. 92.455 __libc_start_main
0. 71.150 double cg_solve_kernel<double,
int>(stop_criterion&, long, long, int const*, int const*, double const*,
double const*, double*)
0. 92.455 main
Am 21.03.22 um 18:51 schrieb Vladimir Mezentsev:
>
>
> On 3/21/22 09:17, Thomas Gruber wrote:
>> Hi,
>>
>> A colleague of mine reported problems when specifying C++ functions in
>> gp-display-text:
>>
>> # the function 'csr_spmv_kernel<double, int>' exists
>>
>> (gp-display-text) fsingle csr_spmv_kernel<double, int>
>
> Hi Thomas,
>
> This demangled name should t be surrounded by double quotes:
> fsingle "csr_spmv_kernel<double,int>(long,long,int const*,int
> const*,double const*,double const*,double*) "
>
>
> Or you can use this form:
> fsingle csr_spmv_kernel [N]
>
> If N is absent, gp-display-text asks which function you want to see.
>
> Thank you,
> -Vladimir
>
>
>
>
>
>
>> Error: Invalid number entered: int>
>> Error: Invalid number entered: int>
>> Error: No function with given name `csr_spmv_kernel<double,' found.
>> (gp-display-text) fsingle csr_spmv_kernel<double,int>
>> Error: No function with given name `csr_spmv_kernel<double,int>' found.
>>
>> So, spaces in the template parameter list seem to be bad. Moreover,
>> '*' in the function parameter list seem to be not parsed properly:
>>
>> (gp-display-text) source csr_spmv_kernel<double,int>(long,long,int
>> const*,int const*,double const*,double const*,double*)
>> Warning: extra arguments to source command, line 2
>> Error: Invalid number entered: const*,int
>> Error: Invalid number entered: const*,int
>> Error: No function or file with given name
>> `csr_spmv_kernel<double,int>(long,long,int' found.
>>
>>
>> Best,
>> Thomas
>>
>>
>
--
Thomas Gruber
Software & Tools
Erlangen National High Performance Computing Center (NHR@FAU)
Friedrich-Alexander University Erlangen-Nürnberg
Martensstraße 1, 91058 Erlangen, Germany
mailto:Thomas.Gruber@fau.de
https://hpc.fau.de/
next prev parent reply other threads:[~2022-03-22 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 16:17 Thomas Gruber
2022-03-21 17:51 ` Vladimir Mezentsev
2022-03-22 16:51 ` Thomas Gruber [this message]
2022-03-22 18:46 ` Vladimir Mezentsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff63c9a7-8735-f007-d1de-fc9155a34a4a@fau.de \
--to=thomas.gruber@fau.de \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).