<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/lib/api, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-04-26T16:15:00Z</updated>
<entry>
<title>tools lib api fs: Add helper to read string from procfs file</title>
<updated>2016-04-26T16:15:00Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-04-26T15:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4bd112df3eea4db63fe90fb4e83c48d3f3bd6512'/>
<id>urn:sha1:4bd112df3eea4db63fe90fb4e83c48d3f3bd6512</id>
<content type='text'>
To read things like /proc/self/comm.

Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Milian Wolff &lt;milian.wolff@kdab.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-ztpkbmseidt0hq2psr46o0h9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools: Move utilities.mak from perf to tools/scripts/</title>
<updated>2016-03-18T16:57:20Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-03-18T16:57:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca70c24fb17b161a6096c584238cf81f664db45d'/>
<id>urn:sha1:ca70c24fb17b161a6096c584238cf81f664db45d</id>
<content type='text'>
As it is used by several other tools, better move it outside tools/perf.

Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-34s9kue3xq9w5mijdmfrfx8s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib api fs: Add sysfs__read_str function</title>
<updated>2016-02-16T20:12:57Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2016-02-14T16:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51c0396c600f49de9c3ff8f6fd83055de3709c3d'/>
<id>urn:sha1:51c0396c600f49de9c3ff8f6fd83055de3709c3d</id>
<content type='text'>
Adding sysfs__read_str function to ease up reading string files from
sysfs. New interface is:

  int sysfs__read_str(const char *entry, char **buf, size_t *sizep);

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1455465826-8426-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib api fs: Adopt filename__read_str from perf</title>
<updated>2016-02-16T20:12:56Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2016-02-14T16:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=607bfbd7ffc60156ae0831c917497dc91a57dd8d'/>
<id>urn:sha1:607bfbd7ffc60156ae0831c917497dc91a57dd8d</id>
<content type='text'>
We already moved similar functions in here, also it'll be useful for
sysfs__read_str addition in following patch.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1455465826-8426-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib api: Add debug output support</title>
<updated>2016-02-16T20:12:56Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2016-02-14T16:03:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=975f14fa8f2996604f248552eee4403def34bf5e'/>
<id>urn:sha1:975f14fa8f2996604f248552eee4403def34bf5e</id>
<content type='text'>
Adding support for warning/info/debug output within libapi code. Adding
following macros:

  pr_warning(fmt, ...)
  pr_info(fmt, ...)
  pr_debug(fmt, ...)

Also adding libapi_set_print function to set above functions. This will
be used in perf to set standard debug handlers for libapi.

Adding 2 header files:
  debug.h
    - to be used outside libapi, contains
      libapi_set_print interface

  debug-internal.h
    - to be used within libapi, contains
      pr_warning/pr_info/pr_debug definitions

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1455465826-8426-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib api fs: No need to use PATH_MAX + 1</title>
<updated>2015-10-05T19:12:09Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2015-10-05T18:06:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ccb5597f9ba11b67b8aa8c6f4682675eceee0e21'/>
<id>urn:sha1:ccb5597f9ba11b67b8aa8c6f4682675eceee0e21</id>
<content type='text'>
Because there's no point, PATH_MAX is big enough.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Don Zickus &lt;dzickus@redhat.com&gt;
Cc: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1444068369-20978-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools build: Build fixdep helper from perf and basic libs</title>
<updated>2015-09-28T18:50:55Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2015-09-23T10:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c422f5572667fef0db38d2046ecce69dcf0afc8'/>
<id>urn:sha1:7c422f5572667fef0db38d2046ecce69dcf0afc8</id>
<content type='text'>
Adding the fixdep target into the Makefile.include to ease up building of
fixdep helper, that needs to be built before we dive in to the build itself.
The user can invoke the fixdep target to build the helper.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1443004442-32660-8-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools build: Add Makefile.include</title>
<updated>2015-09-28T18:50:54Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2015-09-23T10:33:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab6201d09b1840c7ffcd6606c1d3dae68b8b3048'/>
<id>urn:sha1:ab6201d09b1840c7ffcd6606c1d3dae68b8b3048</id>
<content type='text'>
To ease up build framework code setup for users.

More shared code will be added in the following patches.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1443004442-32660-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib api fs: Store tracing mountpoint for better error message</title>
<updated>2015-09-28T18:50:54Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2015-09-19T14:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc240c5dc2a02e335c5bcb50ad3a1274818c8609'/>
<id>urn:sha1:dc240c5dc2a02e335c5bcb50ad3a1274818c8609</id>
<content type='text'>
Storing the actual tracing path mountpoint to display correct
error message hint ('Hint:' line). The error hint rediscovers
mountpoints, but it could be different from what we actually
used in tracing path.

Before we'd display debugfs mount even though tracefs was used:
  $ perf record -e sched:sched_krava ls
  event syntax error: 'sched:sched_krava'
                       \___ can't access trace events

  Error:  No permissions to read /sys/kernel/debug/tracing/events/sched/sched_krava
  Hint:   Try 'sudo mount -o remount,mode=755 /sys/kernel/debug'
  ...

After this change, correct mountpoint is displayed:
  $ perf record -e sched:sched_krava ls
  event syntax error: 'sched:sched_krava'
                       \___ can't access trace events

  Error:  No permissions to read /sys/kernel/debug/tracing/events/sched/sched_krava
  Hint:   Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing'
  ...

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Raphael Beamonte &lt;raphael.beamonte@gmail.com&gt;
Link: http://lkml.kernel.org/r/1442674027-19427-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools lib api cpu: Introduce cpu.[ch] to obtain cpu related information</title>
<updated>2015-09-14T15:50:26Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2015-09-10T15:20:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09f6acf2eacad3a0f9a4b9f77e0b021f0cb45780'/>
<id>urn:sha1:09f6acf2eacad3a0f9a4b9f77e0b021f0cb45780</id>
<content type='text'>
E.g.:

 $ ./cpu__get_max_freq
 3200000

It does that, as Kan's patch does, by looking at these files:

  $ cat /sys/devices/system/cpu/online
  0-3
  $ ./sysfs__read_ull
  devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq=3200000
  $

I.e. find out the first online CPU, then read its cpufreq info.

But do it in tools/lib/api/, so that other tools/ living code can use
it, not just perf.

Based-on-a-patch-by: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Borislav Petkov &lt;bp@suse.de&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-915v4cvxqplaub8qco66b9mv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
