lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151027144244.GE9405@kernel.org>
Date:	Tue, 27 Oct 2015 11:42:44 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Jiri Olsa <jolsa@...nel.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"Liang, Kan" <kan.liang@...el.com>
Subject: Re: [PATCH 31/52] perf stat record: Synthesize stat record data

Em Sun, Oct 25, 2015 at 03:51:47PM +0100, Jiri Olsa escreveu:
> Synthesizing needed stat record data for report/script:
>   - cpu/thread maps
>   - stat config

After this it gets a bit better, but then I expected that to specify an
event I would be able to use:

[root@zoo linux]# perf stat record -e cycles usleep 1
  Error: unknown switch `e'

 Usage: perf record [<options>] [<command>]
    or: perf record [<options>] -- <command> [<options>]

    -o, --output <file>   output file name


But I need to do it as:

[root@zoo linux]# perf stat -e cycles record usleep 1

 Performance counter stats for 'usleep 1':

            948417      cycles                                                      

       0.000749965 seconds time elapsed

[root@zoo linux]# 

--------------------------------------------------

This is confusing...

Anyway, now the perf.data file doesn't produce that many confusing
messages, just one, and the error reporting continues needing a
newline, oops just noticed another problem:

[root@zoo linux]# perf stat record usleep 1

 Performance counter stats for 'usleep 1':

          0.520959      task-clock (msec)         #    0.504 CPUs utilized          
                 1      context-switches          #    0.002 M/sec                  
                 0      cpu-migrations            #    0.000 K/sec                  
                51      page-faults               #    0.098 M/sec                  
            929738      cycles                    #    1.785 GHz                    
            625885      stalled-cycles-frontend   #   67.32% frontend cycles idle   
   <not supported>      stalled-cycles-backend   
            634514      instructions              #    0.68  insns per cycle        
                                                  #    0.99  stalled cycles per insn
            128859      branches                  #  247.350 M/sec                  
              7602      branch-misses             #    5.90% of all branches        

       0.001034675 seconds time elapsed

[root@zoo linux]# perf evlist
non matching sample_type[root@zoo linux]#

But, if I specify an event:

[root@zoo linux]# perf stat -e cycles record usleep 1

 Performance counter stats for 'usleep 1':

            876987      cycles                                                      

       0.001285050 seconds time elapsed

[root@zoo linux]# perf evlist
cycles
[root@zoo linux]# perf evlist -v
cycles: size: 112, read_format: TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING, disabled: 1, inherit: 1, enable_on_exec: 1, exclude_guest: 1
[root@zoo linux]#

-------------------------

It then works as expected, lists the event collected, no confusing message
about 'sample_type' stuff is emitted.

Ditto for 'perf report'

[root@zoo linux]# perf report --stdio
Warning:
Kernel address maps (/proc/{kallsyms,modules}) were restricted.

Check /proc/sys/kernel/kptr_restrict before running 'perf record'.

As no suitable kallsyms nor vmlinux was found, kernel samples
can't be resolved.

Samples in kernel modules can't be resolved as well.

Error:
The perf.data file has no samples!
# To display the perf.data header info, please use --header/--header-only options.
#
[root@zoo linux]# 

------------------------------------------------

I.e. when I explicitely state what events should be collected, it behaves
nicely, modulo this message about kernel address maps being restricted in
'report', so it looks like just some fix is needed to make it work like that
when no events are specified.

So, I'm creating a perf/stat branch and putting what I processed so far, with
the changelog edits and changes in some function/struct names I
partially mentioned, please try to continue from there, ok?

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ