[lkml]   [2014]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFD] perf syscall error handling
On 11/10/14, 5:24 AM, Ingo Molnar wrote:
> Programmatic use in user-spaec is very simple - go with my
> initial example, tooling can either just display the error string
> and bail out, or do:
> if (unlikely(error)) {
> if (!strcmp(attr->error_str, "x86/bts: BTS not supported by this CPU architecture")) {
> fprintf(stderr, "x86/BTS: No hardware support falling back to branch sampling\n");
> activate_x86_bts_fallback_code();
> goto out;
> }

That makes the exact string content part of the ABI. As I recall ftrace
had a problem with format strings changing and tooling then limiting the
ability to change it.


 \ /
  Last update: 2014-11-10 15:41    [W:0.062 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site