perf disasm: Add e_machine/e_flags to struct archCurrently functions like get_dwarf_regnum only work with the hostarchitecture. Carry the elf machine and flags in struct arch so thatin disassembl
perf disasm: Add e_machine/e_flags to struct archCurrently functions like get_dwarf_regnum only work with the hostarchitecture. Carry the elf machine and flags in struct arch so thatin disassembly these can be used to allow cross platform disassembly.Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>Signed-off-by: Ian Rogers <irogers@google.com>Cc: Anup Patel <anup@brainfault.org>Cc: Yang Jihong <yangjihong@bytedance.com>Cc: Palmer Dabbelt <palmer@dabbelt.com>Cc: David S. Miller <davem@davemloft.net>Cc: Albert Ou <aou@eecs.berkeley.edu>Cc: Shenlin Liang <liangshenlin@eswincomputing.com>Cc: Nick Terrell <terrelln@fb.com>Cc: Guilherme Amadio <amadio@gentoo.org>Cc: Steinar H. Gunderson <sesse@google.com>Cc: Changbin Du <changbin.du@huawei.com>Cc: Alexander Lobakin <aleksander.lobakin@intel.com>Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>Cc: Huacai Chen <chenhuacai@kernel.org>Cc: Guo Ren <guoren@kernel.org>Cc: Masahiro Yamada <masahiroy@kernel.org>Cc: Will Deacon <will@kernel.org>Cc: James Clark <james.clark@linaro.org>Cc: Mike Leach <mike.leach@linaro.org>Cc: Chen Pei <cp0613@linux.alibaba.com>Cc: Leo Yan <leo.yan@linux.dev>Cc: Oliver Upton <oliver.upton@linux.dev>Cc: Aditya Gupta <adityag@linux.ibm.com>Cc: Kajol Jain <kjain@linux.ibm.com>Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Cc: linux-arm-kernel@lists.infradead.orgCc: linux-riscv@lists.infradead.orgCc: Bibo Mao <maobibo@loongson.cn>Cc: John Garry <john.g.garry@oracle.com>Cc: Atish Patra <atishp@rivosinc.com>Cc: Dima Kogan <dima@secretsauce.net>Cc: Paul Walmsley <paul.walmsley@sifive.com>Cc: Dr. David Alan Gilbert <linux@treblig.org>Cc: linux-csky@vger.kernel.orgLink: https://lore.kernel.org/r/20241108234606.429459-5-irogers@google.comSigned-off-by: Namhyung Kim <namhyung@kernel.org>
show more ...
perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORTIn Makefile.config for unwinding the name dwarf implies eitherlibunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is reallyjust
perf build: Rename HAVE_DWARF_SUPPORT to HAVE_LIBDW_SUPPORTIn Makefile.config for unwinding the name dwarf implies eitherlibunwind or libdw. Make it clearer that HAVE_DWARF_SUPPORT is reallyjust defined when libdw is present by renaming to HAVE_LIBDW_SUPPORT.Signed-off-by: Ian Rogers <irogers@google.com>Acked-by: Namhyung Kim <namhyung@kernel.org>Tested-by: Leo Yan <leo.yan@arm.com>Cc: Anup Patel <anup@brainfault.org>Cc: Yang Jihong <yangjihong@bytedance.com>Cc: Palmer Dabbelt <palmer@dabbelt.com>Cc: David S. Miller <davem@davemloft.net>Cc: Albert Ou <aou@eecs.berkeley.edu>Cc: Shenlin Liang <liangshenlin@eswincomputing.com>Cc: Nick Terrell <terrelln@fb.com>Cc: Guilherme Amadio <amadio@gentoo.org>Cc: Steinar H. Gunderson <sesse@google.com>Cc: Changbin Du <changbin.du@huawei.com>Cc: Alexander Lobakin <aleksander.lobakin@intel.com>Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>Cc: Huacai Chen <chenhuacai@kernel.org>Cc: Guo Ren <guoren@kernel.org>Cc: Masahiro Yamada <masahiroy@kernel.org>Cc: Masami Hiramatsu (Google) <mhiramat@kernel.org>Cc: Will Deacon <will@kernel.org>Cc: James Clark <james.clark@linaro.org>Cc: Mike Leach <mike.leach@linaro.org>Cc: Chen Pei <cp0613@linux.alibaba.com>Cc: Leo Yan <leo.yan@linux.dev>Cc: Oliver Upton <oliver.upton@linux.dev>Cc: Aditya Gupta <adityag@linux.ibm.com>Cc: Kajol Jain <kjain@linux.ibm.com>Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Cc: linux-arm-kernel@lists.infradead.orgCc: linux-riscv@lists.infradead.orgCc: Bibo Mao <maobibo@loongson.cn>Cc: John Garry <john.g.garry@oracle.com>Cc: Atish Patra <atishp@rivosinc.com>Cc: Dima Kogan <dima@secretsauce.net>Cc: Paul Walmsley <paul.walmsley@sifive.com>Cc: Dr. David Alan Gilbert <linux@treblig.org>Cc: linux-csky@vger.kernel.orgLink: https://lore.kernel.org/r/20241017001354.56973-11-irogers@google.comSigned-off-by: Namhyung Kim <namhyung@kernel.org>
perf annotate: Set instruction name to be used with insn-stat when using raw instructionSince the "ins.name" is not set while using raw instruction,'perf annotate' with insn-stat gives wrong data:
perf annotate: Set instruction name to be used with insn-stat when using raw instructionSince the "ins.name" is not set while using raw instruction,'perf annotate' with insn-stat gives wrong data:Result from "./perf annotate --data-type --insn-stat": Annotate Instruction stats total 615, ok 419 (68.1%), bad 196 (31.9%) Name : Good Bad ----------------------------------------------------------- : 419 196This patch sets "dl->ins.name" in arch specific function"check_ppc_insn" while initialising "struct disasm_line".Also update "ins_find" function to pass "struct disasm_line" as aparameter so as to set its name field in arch specific call.With the patch changes: Annotate Instruction stats total 609, ok 446 (73.2%), bad 163 (26.8%) Name/opcode : Good Bad ----------------------------------------------------------- 58 : 323 80 32 : 49 43 34 : 33 11 OP_31_XOP_LDX : 8 20 40 : 23 0 OP_31_XOP_LWARX : 5 1 OP_31_XOP_LWZX : 2 3 OP_31_XOP_LDARX : 3 0 33 : 0 2 OP_31_XOP_LBZX : 0 1 OP_31_XOP_LWAX : 0 1 OP_31_XOP_LHZX : 0 1Reviewed-by: Kajol Jain <kjain@linux.ibm.com>Reviewed-by: Namhyung Kim <namhyung@kernel.org>Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Tested-by: Kajol Jain <kjain@linux.ibm.com>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Akanksha J N <akanksha@linux.ibm.com>Cc: Christophe Leroy <christophe.leroy@csgroup.eu>Cc: Disha Goel <disgoel@linux.vnet.ibm.com>Cc: Hari Bathini <hbathini@linux.ibm.com>Cc: Ian Rogers <irogers@google.com>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Madhavan Srinivasan <maddy@linux.ibm.com>Cc: Segher Boessenkool <segher@kernel.crashing.org>Link: https://lore.kernel.org/lkml/20240718084358.72242-16-atrajeev@linux.vnet.ibm.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate: Update instruction tracking for powerpcAdd instruction tracking function "update_insn_state_powerpc" forpowerpc. Example sequence in powerpc: ld r10,264(r3) mr r31,r3
perf annotate: Update instruction tracking for powerpcAdd instruction tracking function "update_insn_state_powerpc" forpowerpc. Example sequence in powerpc: ld r10,264(r3) mr r31,r3 <<after some sequence> ld r9,312(r31)Consider ithe sample is pointing to: "ld r9,312(r31)".Here the memory reference is hit at "312(r31)" where 312 is the offsetand r31 is the source register.Previous instruction sequence shows that register state of r3 is movedto r31.So to identify the data type for r31 access, the previous instruction("mr") needs to be tracked and the state type entry has to be updated.Current instruction tracking support in perf tools infrastructure isspecific to x86. Patch adds this support for powerpc as well.Reviewed-by: Kajol Jain <kjain@linux.ibm.com>Reviewed-by: Namhyung Kim <namhyung@kernel.org>Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Tested-by: Kajol Jain <kjain@linux.ibm.com>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Akanksha J N <akanksha@linux.ibm.com>Cc: Christophe Leroy <christophe.leroy@csgroup.eu>Cc: Disha Goel <disgoel@linux.vnet.ibm.com>Cc: Hari Bathini <hbathini@linux.ibm.com>Cc: Ian Rogers <irogers@google.com>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Madhavan Srinivasan <maddy@linux.ibm.com>Cc: Segher Boessenkool <segher@kernel.crashing.org>Link: https://lore.kernel.org/lkml/20240718084358.72242-12-atrajeev@linux.vnet.ibm.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate: Add more instructions for instruction trackingAdd few more instructions and use opcode as search keyto find if it is supported by the architecture.The added ones are: addi, addic,
perf annotate: Add more instructions for instruction trackingAdd few more instructions and use opcode as search keyto find if it is supported by the architecture.The added ones are: addi, addic, addic., addis, subfic and mulliReviewed-by: Kajol Jain <kjain@linux.ibm.com>Reviewed-by: Namhyung Kim <namhyung@kernel.org>Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Tested-by: Kajol Jain <kjain@linux.ibm.com>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Akanksha J N <akanksha@linux.ibm.com>Cc: Christophe Leroy <christophe.leroy@csgroup.eu>Cc: Disha Goel <disgoel@linux.vnet.ibm.com>Cc: Hari Bathini <hbathini@linux.ibm.com>Cc: Ian Rogers <irogers@google.com>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Madhavan Srinivasan <maddy@linux.ibm.com>Cc: Segher Boessenkool <segher@kernel.crashing.org>Link: https://lore.kernel.org/lkml/20240718084358.72242-11-atrajeev@linux.vnet.ibm.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate: Add some of the arithmetic instructions to support instruction tracking in powerpcData-type profiling has the concept of instruction tracking.Example sequence in powerpc: ld
perf annotate: Add some of the arithmetic instructions to support instruction tracking in powerpcData-type profiling has the concept of instruction tracking.Example sequence in powerpc: ld r10,264(r3) mr r31,r3 <<after some sequence> ld r9,312(r31)or differently lwz r10,264(r3) add r31, r3, RB lwz r9, 0(r31)If a sample is hit at "lwz r9, 0(r31)", data type of r31 dependson previous instruction sequence here. So to track the previousinstructions, patch adds changes to identify some of the arithmeticinstructions which are having opcode as 31.Since memory instructions also has cases with opcode 31, use the bits22:30 to filter the arithmetic instructions here.Also there are instructions with just two operands like "addme", "addze".This patch adds new instructions ops "arithmetic_ops" to handle thisReviewed-by: Kajol Jain <kjain@linux.ibm.com>Reviewed-by: Namhyung Kim <namhyung@kernel.org>Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Tested-by: Kajol Jain <kjain@linux.ibm.com>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Akanksha J N <akanksha@linux.ibm.com>Cc: Christophe Leroy <christophe.leroy@csgroup.eu>Cc: Disha Goel <disgoel@linux.vnet.ibm.com>Cc: Hari Bathini <hbathini@linux.ibm.com>Cc: Ian Rogers <irogers@google.com>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Madhavan Srinivasan <maddy@linux.ibm.com>Cc: Segher Boessenkool <segher@kernel.crashing.org>Link: https://lore.kernel.org/lkml/20240718084358.72242-10-atrajeev@linux.vnet.ibm.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate: Add support to identify memory instructions of opcode 31 in powerpcThere are memory instructions in powerpc with opcode as 31.Example: "ldx RT,RA,RB" , Its X form is as below: __
perf annotate: Add support to identify memory instructions of opcode 31 in powerpcThere are memory instructions in powerpc with opcode as 31.Example: "ldx RT,RA,RB" , Its X form is as below: ______________________________________ | 31 | RT | RA | RB | 21 |/| -------------------------------------- 0 6 11 16 21 30 31The opcode for "ldx" is 31. There are other instructions also withopcode 31 which are memory insn like ldux, stbx, lwzx, lhauxBut all instructions with opcode 31 are not memory. Example is addinstruction: "add RT,RA,RB"The value in bit 21-30 [ 21 for ldx ] is different for theseinstructions. Patch uses this value to assign instruction ops for thesecases. The naming convention and value to identify these are picked fromdefines in "arch/powerpc/include/asm/ppc-opcode.h"Reviewed-by: Kajol Jain <kjain@linux.ibm.com>Reviewed-by: Namhyung Kim <namhyung@kernel.org>Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Tested-by: Kajol Jain <kjain@linux.ibm.com>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Akanksha J N <akanksha@linux.ibm.com>Cc: Christophe Leroy <christophe.leroy@csgroup.eu>Cc: Disha Goel <disgoel@linux.vnet.ibm.com>Cc: Hari Bathini <hbathini@linux.ibm.com>Cc: Ian Rogers <irogers@google.com>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Madhavan Srinivasan <maddy@linux.ibm.com>Cc: Segher Boessenkool <segher@kernel.crashing.org>Link: https://lore.kernel.org/lkml/20240718084358.72242-9-atrajeev@linux.vnet.ibm.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate: Add parse function for memory instructions in powerpcUse the raw instruction code and macros to identify memory instructions,extract register fields and also offset.The implementa
perf annotate: Add parse function for memory instructions in powerpcUse the raw instruction code and macros to identify memory instructions,extract register fields and also offset.The implementation addresses the D-form, X-form, DS-form instructions.Two main functions are added.New parse function "load_store__parse" as instruction ops parser formemory instructions.Unlike other parsers (like mov__parse), this one fills in the"multi_regs" field for source/target and new added "mem_ref" field. Noother fields are set because, here there is no need to parse thedisassembled code and arch specific macros will take care of extractingoffset and regs which is easier and will be precise.In powerpc, all instructions with a primary opcode from 32 to 63are memory instructions. Update "ins__find" function to have "raw_insn"also as a parameter.Reviewed-by: Kajol Jain <kjain@linux.ibm.com>Reviewed-by: Namhyung Kim <namhyung@kernel.org>Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Tested-by: Kajol Jain <kjain@linux.ibm.com>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Akanksha J N <akanksha@linux.ibm.com>Cc: Christophe Leroy <christophe.leroy@csgroup.eu>Cc: Disha Goel <disgoel@linux.vnet.ibm.com>Cc: Hari Bathini <hbathini@linux.ibm.com>Cc: Ian Rogers <irogers@google.com>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Madhavan Srinivasan <maddy@linux.ibm.com>Cc: Segher Boessenkool <segher@kernel.crashing.org>Link: https://lore.kernel.org/lkml/20240718084358.72242-8-atrajeev@linux.vnet.ibm.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate: Add disasm_line__parse() to parse raw instruction for powerpcCurrently, the perf tool infrastructure uses the disasm_line__parsefunction to parse disassembled line.Example snippet
perf annotate: Add disasm_line__parse() to parse raw instruction for powerpcCurrently, the perf tool infrastructure uses the disasm_line__parsefunction to parse disassembled line.Example snippet from objdump: objdump --start-address=<address> --stop-address=<address> -d --no-show-raw-insn -C <vmlinux> c0000000010224b4: lwz r10,0(r9)This line "lwz r10,0(r9)" is parsed to extract instruction name,registers names and offset.In powerpc, the approach for data type profiling uses raw instructioninstead of result from objdump to identify the instruction category andextract the source/target registers.Example: 38 01 81 e8 ld r4,312(r1)Here "38 01 81 e8" is the raw instruction representation. Add function"disasm_line__parse_powerpc" to handle parsing of raw instruction.Also update "struct disasm_line" to save the binary code/With the change, function captures:line -> "38 01 81 e8 ld r4,312(r1)"raw instruction "38 01 81 e8"Raw instruction is used later to extract the reg/offset fields. Macrosare added to extract opcode and register fields. "struct disasm_line"is updated to carry union of "bytes" and "raw_insn" of 32 bit to carry rawcode (raw).Function "disasm_line__parse_powerpc fills the raw instruction hex valueand can use macros to get opcode. There is no changes in existing codepaths, which parses the disassembled code. The size of raw instructiondepends on architecture.In case of powerpc, the parsing the disasm line needs to handle casesfor reading binary code directly from DSO as well as parsing the objdumpresult. Hence adding the logic into separate function instead ofupdating "disasm_line__parse". The architecture using the instructionname and present approach is not altered. Since this approach targetspowerpc, the macro implementation is added for powerpc as of now.Since the disasm_line__parse is used in other cases (perf annotate) andnot only data tye profiling, the powerpc callback includes changes towork with binary code as well as mnemonic representation.Also in case if the DSO read fails and libcapstone is not supported, theapproach fallback to use objdump as option. Hence as option, patch haschanges to ensure objdump option also works well.Reviewed-by: Kajol Jain <kjain@linux.ibm.com>Reviewed-by: Namhyung Kim <namhyung@kernel.org>Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>Tested-by: Kajol Jain <kjain@linux.ibm.com>Cc: Adrian Hunter <adrian.hunter@intel.com>Cc: Akanksha J N <akanksha@linux.ibm.com>Cc: Christophe Leroy <christophe.leroy@csgroup.eu>Cc: Disha Goel <disgoel@linux.vnet.ibm.com>Cc: Hari Bathini <hbathini@linux.ibm.com>Cc: Ian Rogers <irogers@google.com>Cc: Jiri Olsa <jolsa@kernel.org>Cc: Madhavan Srinivasan <maddy@linux.ibm.com>Cc: Segher Boessenkool <segher@kernel.crashing.org>Link: https://lore.kernel.org/lkml/20240718084358.72242-5-atrajeev@linux.vnet.ibm.com[ Add check for strndup() result ]Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Merge branch 'linus' into perf/core, to fix conflictsConflicts: tools/perf/arch/arm/annotate/instructions.c tools/perf/arch/arm64/annotate/instructions.c tools/perf/arch/powerpc/annotate/instruc
Merge branch 'linus' into perf/core, to fix conflictsConflicts: tools/perf/arch/arm/annotate/instructions.c tools/perf/arch/arm64/annotate/instructions.c tools/perf/arch/powerpc/annotate/instructions.c tools/perf/arch/s390/annotate/instructions.c tools/perf/arch/x86/tests/intel-cqm.c tools/perf/ui/tui/progress.c tools/perf/util/zlib.cSigned-off-by: Ingo Molnar <mingo@kernel.org>
License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseMany source files in the tree are missing licensing information, whichmakes it harder for compliance tools to determine
License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseMany source files in the tree are missing licensing information, whichmakes it harder for compliance tools to determine the correct license.By default all files without license information are under the defaultlicense of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'SPDX license identifier. The SPDX identifier is a legally bindingshorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart andPhilippe Ombredanne.How this work was done:Patches were generated and checked against linux-4.14-rc6 for a subset ofthe use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up caseswhere non-standard license headers were used, and references to licensehad to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied toa file was done in a spreadsheet of side by side results from of theoutput of two independent scanners (ScanCode & Windriver) producing SPDXtag:value files created by Philippe Ombredanne. Philippe prepared thebase worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 filesassessed. Kate Stewart did a file by file comparison of the scannerresults in the spreadsheet to determine which SPDX license identifier(s)to be applied to the file. She confirmed any determination that was notimmediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines).All documentation files were explicitly excluded.The following heuristics were used to determine which SPDX licenseidentifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time.In total, over 70 hours of logged manual review was done on thespreadsheet to determine the SPDX license identifiers to apply to thesource files by Kate, Philippe, Thomas and, in some cases, confirmationby lawyers working with the Linux Foundation.Kate also obtained a third independent scan of the 4.13 code base fromFOSSology, and compared selected files where the other two scannersdisagreed against that SPDX file, to see if there was new insights. TheWindriver scanner is based on an older version of FOSSology in part, sothey are related.Thomas did random spot checks in about 500 files from the spreadsheetsfor the uapi headers and agreed with SPDX license identifier in thefiles he inspected. For the non-uapi files Thomas did random spot checksin about 15000 files.In initial set of patches against 4.14-rc6, 3 files were found to havecopy/paste license identifier errors, and have been fixed to reflect thecorrect identifier.Additionally Philippe spent 10 hours this week doing a detailed manualinspection and review of the 12,461 patched files from the initial patchversion early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correctThis produced a worksheet with 20 files needing minor correction. Thisworksheet was then exported into 3 different .csv files for thedifferent types of files to be modified.These .csv files were then reviewed by Greg. Thomas wrote a script toparse the csv files and add the proper SPDX tag to the file, in theformat that the file expected. This script was further refined by Gregbased on the output to detect more types of files automatically and todistinguish between header and source .c files (which need differentcomment types.) Finally Greg ran the script using the .csv files togenerate the patches.Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>Reviewed-by: Thomas Gleixner <tglx@linutronix.de>Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
perf annotate: Remove arch::cpuid_parse callbackThere's no need for extra cpuid_parse arch callback, it can be handleddirectly in init callback.Adding the init function to x86 to cover the cpuid
perf annotate: Remove arch::cpuid_parse callbackThere's no need for extra cpuid_parse arch callback, it can be handleddirectly in init callback.Adding the init function to x86 to cover the cpuid initialization.Signed-off-by: Jiri Olsa <jolsa@kernel.org>Cc: Andi Kleen <andi@firstfloor.org>Cc: David Ahern <dsahern@gmail.com>Cc: Namhyung Kim <namhyung@kernel.org>Cc: Peter Zijlstra <peterz@infradead.org>Link: http://lkml.kernel.org/r/20171011150158.11895-2-jolsa@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate: Initial PowerPC supportSupport the PowerPC architecture using the ins_ops associationmethod.Committer notes:Testing it with a perf.data file collected on a PowerPC machine andc
perf annotate: Initial PowerPC supportSupport the PowerPC architecture using the ins_ops associationmethod.Committer notes:Testing it with a perf.data file collected on a PowerPC machine andcross-annotated on a x86_64 workstation, using the associated vmlinuxfile:$ perf report -i perf.data.f22vm.powerdev --vmlinux vmlinux.powerpc .ktime_get vmlinux.powerpc │ clrldi r9,r28,63 8.57 │ ┌──bne e0 <- TUI cursor positioned here │54:│ lwsync 2.86 │ │ std r2,40(r1) │ │ ld r9,144(r31) │ │ ld r3,136(r31) │ │ ld r30,184(r31) │ │ ld r10,0(r9) │ │ mtctr r10 │ │ ld r2,8(r9) 8.57 │ │→ bctrl │ │ ld r2,40(r1) │ │ ld r10,160(r31) │ │ ld r5,152(r31) │ │ lwz r7,168(r31) │ │ ld r9,176(r31) 8.57 │ │ lwz r6,172(r31) │ │ lwsync 2.86 │ │ lwz r8,128(r31) │ │ cmpw cr7,r8,r28 2.86 │ │↑ bne 48 │ │ subf r10,r10,r3 │ │ mr r3,r29 │ │ and r10,r10,r5 2.86 │ │ mulld r10,r10,r7 │ │ add r9,r10,r9 │ │ srd r9,r9,r6 │ │ add r9,r9,r30 │ │ std r9,0(r29) │ │ addi r1,r1,144 │ │ ld r0,16(r1) │ │ ld r28,-32(r1) │ │ ld r29,-24(r1) │ │ ld r30,-16(r1) │ │ mtlr r0 │ │ ld r31,-8(r1) │ │← blr 5.71 │e0:└─→mr r1,r1 11.43 │ mr r2,r2 11.43 │ lwz r28,128(r31) Press 'h' for help on key bindings $ perf report -i perf.data.f22vm.powerdev --header-only # ======== # captured on: Thu Nov 24 12:40:38 2016 # hostname : pdev-f22-qemu # os release : 4.4.10-200.fc22.ppc64 # perf version : 4.9.rc1.g6298ce # arch : ppc64 # nrcpus online : 48 # nrcpus avail : 48 # cpudesc : POWER7 (architected), altivec supported # cpuid : 74,513 # total memory : 4158976 kB # cmdline : /home/ravi/Workspace/linux/tools/perf/perf record -a # event : name = cycles:ppp, , size = 112, { sample_period, sample_freq } = 4000, sample_type = IP|TID|TIME|CPU|PERIOD, disabled = 1, inherit = 1, mmap = 1, comm = 1, freq = 1, task = 1, precise_ip = 3, sample_id_all = 1, exclude_guest = 1, mmap2 = 1, comm_exec = 1 # HEADER_CPU_TOPOLOGY info available, use -I to display # HEADER_NUMA_TOPOLOGY info available, use -I to display # pmu mappings: cpu = 4, software = 1, tracepoint = 2, breakpoint = 5 # missing features: HEADER_TRACING_DATA HEADER_BRANCH_STACK HEADER_GROUP_DESC HEADER_AUXTRACE HEADER_STAT HEADER_CACHE # ======== # $Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>Cc: Kim Phillips <kim.phillips@arm.com>Link: http://lkml.kernel.org/n/tip-tbjnp40ddoxxl474uvhwi6g4@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>