1. A system with a computer implementation of performance profiling for performance analysis, the system comprising: a processor coupled to a non-transitory computer-readable storage medium, the processor being configured for: inserting probe points, using an application instrumentation, into a target application program so that at run-time, performance profiling can be done by enabling those probe points; profiling, using an application dynamic tracing, with selected targets and overhead budget, the target application performance during its execution; and analyzing, using a performance data analyzer, the application performance data output by the application dynamic tracing; wherein the application instrumentation, application dynamic tracing and performance data analyzer are configured to cooperate to selectively enable and disable dynamic function-level hardware performance profiling of hardware performance events and association of the hardware performance events with function calls for application performance analysis at a plurality of times on any subset of application functions and any subset of the hardware performance events; wherein a profiling scope is specified by inputting the selected targets and the profiling is configured to begin upon execution of the target application or on demand by a user or an external process at any selected time during the execution of the target application, the selected targets including interested hardware performance events and interested application functions; wherein the overhead budget is specified by a target overhead limit; wherein the profiling ends after a specified time interval or upon termination of the target application; wherein the application dynamic tracing comprises a function tracing for running the target application processes and threads through the probe points of the application instrumentation; wherein the tracing function generates an index to a shared data table using a process or thread identification and a function identification; and wherein the tracing function, if the probe point is for a beginning of the application function, uses available hardware performance counters to read current values of selected hardware performance events, and stores those values, and wherein the tracing function, if the probe point is for an ending of the application function, uses available hardware performance counters to read current values of selected hardware performance events, subtracting them by corresponding beginning values stored earlier for the same function of the same thread, and updating an event value attribute for each selected hardware event with a calculated value.