Bueno, yo diría que sí se puede. Si se trata de eventos:
   Código PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-type" content="text/html;charset=iso-8859-1" />
<meta name="Author" content="derkeNuke" />
<title>Página nueva</title>
<style type="text/css">
 
</style>
</head>
 
<body>
 
<div id="uno" onclick="alerta(event)">uno</div>
<div id="dos" onclick="alerta(event)">dos</div>
 
<script type="text/javascript">
<!--
 
 
function alerta(ev) {
    var src = window.event ? window.event.srcElement : ev.target;
    alert( "Has hecho click en la capa con id \""+src.id+"\"" );
}
 
// -->
</script>
 
</body>
</html> 
   
  Y si se trata de funciones que llaman a funciones se averigua la función que llamó a la actual con 
nombreDeLaFuncion.caller.   
Saludos.